CISC 1315 Fundamentals of Programming
Allan Kochis,Adjunct Professor - CIT


  1. Program One
    Area of a Rectangle.
    Input Processing Output

    Length
    Width
    // Processing items
    Area
     
    
    Start
    Get Length
    Get Width
    Compute Area as Length * Width 
    Display Area
    Stop
    
    Area

  2. Pseudo to Real Code
    IPO C++
    Input
    Length
    Width


    Output
    Area


    Algorithm

    Start

    Get Length

    Get Width

    Compute Area as Length * Width

    Display Area

    Stop
    //
    // Assignment (in class first program)
    // Name
    
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
        int length;
        int width;
        int area;
        
        cout << " Enter the Length :";
        cin  >> length;
        
        cout << " Enter the Width :";
        cin  >> width;
        
        area=length * width;
        
        cout << "The area is :" << area << endl;
        
        system("pause");
        return 0;
    }
    

  3. Running the program
     Enter the Length :20
     Enter the Width :30
    The area is :600
    Press any key to continue . . .