#include "stdafx.h"
#include "conio.h"
#include "iostream"
#include "stdio.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int n,i;
int sum=0;
i=1;
while(i<=5)
{
cout<<"enter a number"<<endl;
cin>>n;
sum=sum+n;
i++;
cout<<"sum="<<sum<<endl;
}
getch();
}
0 comments :
Post a Comment