Horje
Compute Average Code Example
Compute Average
    int a, b, c, d, sum, average;

    cout << "Input the 1st number: ";
    cin >> a;
    cout << "Input the 2nd number: ";
    cin >> b;
    cout << "Input the 3rd number: ";
    cin >> c;
    cout << "Input the 4th number: ";
    cin >> d;

    sum = a+b+c+d;
    average = sum/4;

    cout << "The average is: " << average << endl;




Cpp

Related
C++ Third angle of a Triangle Code Example C++ Third angle of a Triangle Code Example
how to fix class friendship errors in c++ Code Example how to fix class friendship errors in c++ Code Example
what are various sections of process Code Example what are various sections of process Code Example
how to create a copy constructor for generic array class in c++ Code Example how to create a copy constructor for generic array class in c++ Code Example
controlling in windows Code Example controlling in windows Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10