Wednesday 19 October 2016

Program for finding average in C++ with blogging

#include<iostream>
using namespace std;
int main()
{
int a,b,c;
float avg;
cout<<"Enter a value 1:";
cin>>a;
cout<<"Enter a 2nd value:";
cin>>b;
cout<<"Enter a third value:";
cin>>c;
avg=a+b+c/3.0;
cout<<avg;

return 0;
}

https://mainadilsahu.blogspot.com/   plz join this link

No comments:

Post a Comment