Advertisement
MohamedAbdel3al

loop

Nov 16th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. int num;
  2. char check;
  3. do{
  4. printf("Please,enter a number : \n");
  5. scanf("%d", &num);
  6. if(num % 2 == 0){
  7. printf("The number is even.\n");
  8. }else{
  9. printf("The number is odd.\n");
  10. }
  11. printf("Want to check more y for yes and n for no ?\n");
  12. scanf("%c", &check);
  13. }while(check =='n');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement