Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1.  
  2. #include <cstdio>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int a=0;
  9.     printf("Podaj liczbe: ");
  10.     while(scanf("%d",&a)!=1)
  11.     {
  12.         printf("Podaj liczbe: ");
  13.         int b=0;
  14.         while((b=getchar())!='\n' && b!=EOF);
  15.     }
  16.     printf("%d",a);
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement