Solving a very tough Question of C language using my logic , Programmer

avatar

image.png

Hello community friends,

Greeting from @mrdani12 to all my beautiful friends, Hopefully you guys are doing .

Today I am going to share my university work , Today Our sir give us very tough question about c language, I am a software engineering student , I am going share the tough question , this is my 2 semester in university , we are now learning about c language which is mother of language , C language is very basic learn , If you want to become a best programmer, you need to learn the basic very careful to become a best programmer .

I am going to share the question which is about switch , switch is condition of c language through which you can solve many problem.

My Program Question

image.png

There is many question which is given in my assignment but I am going to work on it , This question is easy to solve with switch statement but the many problem is that if user give incorrect number of month , You have to give another chance to user to type a correct number.

I try many method to solve this problem ,people get help from chat gpt but it can destory your creativity , first solve by your own after that if it not solve then take help from chat gpt .

Solving in Compiler

image.png

This is the program which I want to solve , This program is not so difficult I print month name ,when I entered number upto 12 but if user number exceed from 12 then I try if to enter a valid number , the main problem is that that I want to get the valid number from user until then give a correct number then I use while loop to make my problem solve.

Output Of Program

image.png

This is all about from my today work which make me more productive and learn new thing in programming , If you want to get sucess you have to word hard .

Your best Regarded @mrdani12



0
0
0.000
0 comments