forked from jYOTIHARODE/Hacktoberfest2021-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOdd_even.cpp
53 lines (45 loc) · 1.52 KB
/
Odd_even.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include<stdio.h>
int main (void)
{
printf("Are you getting juggled with the even and odd numbers...\n");
printf("Dont worry\n\n");
printf("'****' We are there for you '****'\n");
printf("Just enter the number, we will tell you the number is even or the odd.\n");
int num;
printf("Please enter the valid number.\n");
scanf("%d.\n",&num);
printf("Okk..... You entered %d\n",num);
printf("****Let's the magic begin****\n\n");
if(num%2==0){
printf("Your entered number is even i.e. %d is even number.\n",num);
}
else{
printf("Your entered number is odd i.e. %d is odd number.\n",num);
}
printf("Hope you get your desired result..\n");
printf("PLEASE rate us.\n");
int rating;
printf("Please enter the rating.\n");
scanf("%d.\n",&rating);
switch(rating){
case 1:
printf("You rate me 1.\nThanks for rating , We try to improve our work.\n");
break;
case 2:
printf("You rate me 2.\nThanks for rating, We try to improve our work.\n");
break;
case 3:
printf("You rate me 3.\nThanks for rating, We try to improve our work.\n");
break;
case 4:
printf("You rate me 4.\nThanks for rating.\n");
break;
case 5:
printf("You rate me 5.\nThanks for rating.\n");
break;
default:
printf("INVALID RATING! plase grade us for our work.\n");
break;
}
return 0;
}