Create For.c
parent
0560dda7ea
commit
9263463395
|
@ -0,0 +1,14 @@
|
|||
#include <stdio.h>
|
||||
int main () {
|
||||
int jumlah =0;
|
||||
int awal;
|
||||
int bil;
|
||||
int i;
|
||||
|
||||
scanf("%d",&awal);
|
||||
for(i=0;i<awal;i++) {
|
||||
scanf("%d",&bil);
|
||||
jumlah+=bil;
|
||||
}
|
||||
printf("%d\n",jumlah);
|
||||
}
|
Loading…
Reference in New Issue