Sunday, June 8, 2014

C++ Beginners Tutorial 11 - Do While Loops

10:24 AM



#include <iostream>
using namespace std;
int main()
{
int x=1;
int number=0;
int sum=0;

do
{
cout<<"input any value"<<endl;
cin>>number;
sum=sum+number;

x++;
}while(x<1);

cout<<"The sum is="<<sum<<endl;
return 0;
}





Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top