Вы находитесь на странице: 1из 2

PROGRAME-9

TASK-WAP to calculate average of 3 numbers

PURPOSE- By implementing this program we are capable to find out average of


any three numbers entered by user.

#include<iostream.h>

#include<conio.h>

int main()

int num1,num2,num3,average;

cout<<"enter first no.";

cin>>num1;

cout<<"enter second no.";

cin>>num2;

cout<<"enter third no.";

cin>>num3;

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

cout<<"average of three no.is:"<<average;

getch();

}
OUTPUT-

Вам также может понравиться