Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a;
- printf("Please give me a number: ");
- scanf ("%i",&a);
- if ( a < 0)
- {
- printf("ERROR. The number is smaller than zero.");
- return 1;
- }
- while ( a >= 1)
- {
- a = a-1;
- printf("%i\n",a);
- }
- //for (a>0 ; a>=0 ; a = a-1)
- //{
- //printf("%i\n",a);
- //}
- return 0;
- }
Add Comment
Please, Sign In to add comment