Press "Enter" to skip to content

C- Switch Case (Calculator)

In C language , There are some term  we use when we define the case using with the Switch Case construction. When we press the these terms , Cases will be happen in the defined case.

Now , I will make a program, program will be get user for library. When the user press + , that user will enter the library and when the user press – , user will be out of the library and program will count the total user number and will press the screen. Code Syntax;

We can make the same program using if else instead of the switch case . It’s entirely your choice.

Screen Output;

Now i will make calculator using with the Switch Case . Making a calculator actually very simple . Also you can do it using with the if else. Code Syntax;

Screen Output;

 

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *