//pgm to find the sum and avg of first 10 nos
#include<iostream.h>
#include<conio.h>
void main()
{
float i=1,sum=0,avg;
while(i<=10)
{
sum=sum+i;
i++;
}
avg=sum/10;
cout<<"sum="<<sum<<endl;
cout<<"avg="<<avg;
getch();
}
Please Click on ADS!!
Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!
Tuesday, August 31, 2010
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment