Thursday, 15 December 2011

array dimensi 1


#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
clrscr();
int y[]={1,2,7,4,5};
int n,r=0;
for (n=0; n<5;n++)
{r+=y[n];}
cout<<" "<<r;
getch();
}

No comments:

Post a Comment