Today we are Learn how to make calulator using switch case in “c language” here am going to tell you about uses of switch case and sintex of swetch case then after we make a calculater using that.
“Switch” case is little bet
same as “if” and “else” in switch we are
use “case” and case is run when
condition is true and condition is false then “default” case is run . you understand
more better when we are write sintex and code using those keywords.
First we write switch keyword
sintex and then write programme to make calculater using switch keyword…
1. Sintex for switch keyword
Now I
hope so you are understand switch keyword and now am going to tell you uses of “break”
Basically
“Breck” use in loops and switch to stop the “opration” yes this is very simple
thing and very simple uses too.
Now we are Write a program using switch
keyword and make a beautiful calculater
So let’s started….
Output:-
enter a value to
calulate
enter the value of
a=23
enter the value of
b=7
for addition enter
'+'
for substraction
enter '-'
for multiplication
enter '*'
for division enter
'/'
*
23*7=161
0 Comments