Guest User

Untitled

a guest
May 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. int main(void) {
  4.     int luvut[5];
  5.     int summa = 0;
  6.     int i;
  7.     for(i=0; i<5; i++){
  8.         printf ("Anna %d luku.  \n", i+1);
  9.         scanf ("%d", &luvut[i]);
  10.         summa = summa+luvut[i];
  11. }
  12. printf ("Lukujen summa: %d", summa);
  13.     getch();
  14.     return 0;
  15. }
Add Comment
Please, Sign In to add comment