Computer Science, asked by kAnanda8661, 1 year ago

How to find out the average of three numbers in q basic programram

Answers

Answered by ahmadmahmood033
0

Find out the Average of three number in programming ?

Answer :-  #include <iostream>

using namespace std;

main()  

{  

   int num1,num2,num3,avg;

   cout << "The age of student 1 : ";

   cin >> num1;

   cout << "The age of student 2 : ";

   cin >> num2;

   cout << "The age of student 3 : ";

   cin >> num3;

   

   int avg;

   avg = (num1+num2+num3)/3 ;

   

   cout << "Average num of 3 students is : " << avg;

}

Similar questions