Create For.c

master
MD15 2020-04-10 12:37:19 +07:00 committed by GitHub
parent 0560dda7ea
commit 9263463395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

14
06. Perulangan/For.c Normal file
View File

@ -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);
}