You are on page 1of 1

Dietel and Dietel Exercise Solution 2.

15
============================================
#include<iostream.h>
void main()
{
int x=1,total=0,y;
while(x<=10)
{
y=x*x;
cout<<y<<endl;
total+=y;
++x;
}
cout<<endl<<total<<endl;

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006