Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- int main()
- {
- int change;
- int age;
- int result;
- printf(" 1. month\n 2. week\n 3. day\n");
- printf("Choose month, week or day:==>>>\n");
- scanf("%d", &change);
- if(change == 1){
- printf("Enter Your Age\n");
- scanf("%d", &age);
- result=age*12;
- printf("month = %d", result);
- }else if (change==2){
- printf("Enter Your Age\n");
- scanf("%d", &age);
- result=age*52;
- printf("week = %d", result);
- }else if(change==3){
- printf("Enter Your Age\n");
- scanf("%d", &age);
- result=age*365;
- printf("day = %d", result);
- }else{
- printf("error");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement