Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * switch.c
- *
- * Created on: Feb 19, 2018
- * Author: student
- */
- #include <stdio.h>
- int main(){
- int luna;
- printf("BAGA NR. LUNII: ");
- scanf("%d",&luna);
- switch(luna){
- case 1: printf("IAN");break;
- case 2: printf("FEB");break;
- case 3: printf("MAR");break;
- case 4: printf("APR");break;
- case 5: printf("MAI");break;
- case 6: printf("IUN");break;
- case 7: printf("IUL");break;
- case 8: printf("AUG");break;
- case 9: printf("SEP");break;
- case 10: printf("OCT");break;
- case 11: printf("NOI");break;
- case 12: printf("DEC");break;
- default:printf("LUNA GRESITA");break;
- }
- if(luna==12 || luna==1 || luna==2)
- printf("- IARNA");
- else if(luna==3 || luna==4 || luna==5)
- printf("- PRIMAVARA");
- else if(luna==6 || luna==7 || luna==8)
- printf("- VARA");
- else if(luna==9 || luna==10 || luna==11)
- printf("- TOAMNA");
- else
- printf("- -");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement