Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include "stdio.h"
  3. #include "math.h"
  4.  
  5. int main() {
  6.  
  7.     int num;
  8.     int exit = 0;
  9.  
  10.  
  11.     while (exit != 1) {
  12.  
  13.         printf("Inseriscimi un numero compreso tra 15 e 25 \n");
  14.         scanf("%d", &num);
  15.  
  16.         while ((num < 15) || (num > 25)) {
  17.             printf("Attenzione! Inseriscimi un numero compreso tra 15 e 25 \n");
  18.             scanf("%d", &num);
  19.         }
  20.  
  21.         while (num > 0) {
  22.             printf("%d \n", num);
  23.             num--;
  24.         }
  25.  
  26.         printf("se desidera inserire un' altro numero premere invio, se desidera uscire premere 1");
  27.         scanf("%d", &exit);
  28.     }
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement