Program to enter two integer and find their sum and average.

Program to enter two integer and find their sum and average.

#include <iostream>
using namespace std;
int main(){
       int a, b,c;
       cout << "Enter Number" << endl;
       cin >> a;
       cout << "Enter number" << endl;
       cin >> b;
       c = a + b;
       cout << "Sum of numbers is " << c << endl;
       c = c / 2;
       cout << "average of numbers is " << c << endl;





       system("pause");
       return 0;

}

Comments