Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication1.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char *argv[])
- {
- int liczba_monet;
- int awers_rewers[100];
- int wynik =0;
- printf("Podaj liczbe monet\n");
- scanf_s("%d", &liczba_monet);
- for (int i = 0; i < liczba_monet; i++)
- {
- printf("podaj na jakiej stronie lezy moneta 1-awers, 0-rewers\n");
- scanf_s("%d", &awers_rewers[i]);
- }
- for (int i = 0; i < liczba_monet;i++)
- {
- printf("%d\t", awers_rewers[i]);
- printf("\n");
- if (awers_rewers[i] == 0)
- {
- wynik= wynik + 1;
- }
- }
- printf("wynik - %d ", wynik);
- getchar();
- getchar();
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement