Tips for heathy life

Tips for heathy life

Minggu, 02 November 2008

How to display 10 integer and summation of that integer in C++?


I want to share how to display 10 integer and summation. You can use this code but if you copy this code and paste in your blog/website, please insert this link of article.

---------------------
#include
#include
void main ( )
{
clrscr( );
int i,x,jml;
int index[10] = {1,2,3,4,5,6,7,8,9,10};
for(i=1;i<11 br="" i=""> {
cout<<"Input integer number- "< cin< jml=x;
jml=jml+x;
cout<<"Total of integer = "< }
getch( );
}

0 komentar:

Posting Komentar