Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <conio.h>
- #include <stdio.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- int suma=0;
- int cyfra[4];
- printf("Podaj kolejno 4 cyfry: ");
- for (int i = 0; i < 4; i++)
- {
- scanf("%d", &cyfra[i]);
- }
- for (int i = 0; i < 4; i++)
- {
- printf("%d\n", cyfra[i]);
- suma = suma + cyfra[i];
- }
- printf("%d\n", suma);
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement