Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.  
  9. int N;
  10. int M;
  11. int i;
  12. do
  13. {
  14. cout<<"Inserisci un valore intero N e positivo";
  15. cin >> N;
  16. }while(N<=0 || N>=20);
  17.  
  18. do
  19. {
  20. cout<<" inserisci un valore intero M e positivo ";
  21. cin>>M;
  22. }while(M<=N || M>=20);
  23.  
  24. for(i=N;i<=M;i++)
  25. {
  26. cout<<i;
  27. }
  28.  
  29.  
  30.  
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement