//pgm to find the sum and average of first 10 numbers
#include<iostream.h>
#include<conio.h>
void main()
{
float i,sum,average;
clrscr();
sum=0;
for(i=1;i<=10;i++)
sum=sum+i;
average=sum/10;
cout<<"sum="<<sum<<endl;
cout<<"average="<<average;
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