Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<conio.h>
- int main()
- {
- int c,b,sucet=0;
- c = getch();
- while(1)
- {
- if(c == 27)
- {
- printf("Ukoncil si zadavanie\n");
- break;
- }
- else
- {
- printf("Zadaj cislo postupnosti \n");
- scanf("%d", &b);
- sucet += b;
- c = getch();
- }
- }
- printf("Vysledok je; %d\n", sucet);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement