Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <conio.h>
- int main()
- {
- int liczba = 0, tmp, count = 0;
- while (true)
- {
- printf("Podaj liczbe: ");
- scanf("%d", &liczba);
- tmp = liczba;
- while (tmp / 10 > 0)
- {
- tmp = tmp / 10;
- count++;
- }
- printf("Ilosc cyfr w liczbie: %d\n", count + 1);
- count = 0;
- }
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement