How to make calculator using c language | Calculator using Switch Case in C programing

preview_player
Показать описание
How to Make Calculator using Programming Language Step By Step Coding Guide in hindi in This i Will Explain What is Switch Statement in computer programming Language? and how we can make a simple calculator using c programming Language full Guide in hindi and urdu langauge if you are a computer student and learning programming language then you must know how to make calculator with the help of switch statement in programming language.
agar aap ek computer ke student ho computer sikh rahe ho aur computer me programming language sikh rahe ho coding sikhna accha lagta hai to aise me aapko ye jarur pata hona chahiye ki aakhir me calculator kis tarah banta hai kisi bhi programming language me chahe vo c language ho C++, C# ya java programminglanguage ho aapko coding se calculator computer sikh rahe ho aur computer me programming language sikh rahe ho coding sikhna accha lagta hai to aise me aapko ye jarur pata hona chahiye ki aakhir me calculator kis tarah banta hai kisi bhi programming language me chahe vo c language ho C++, C# ya java programming language ho aapko coding se calculator banan jarur aana chahiye to is video me mai aapko sikhaunga bahot hi aasan tarike se switch statement ki madad se sath me ye bhi bataunga ki switch statement kya hota hai aur ise kaise use krte hai details me jaankari dunga.

main youtube chanel:

instagram:

hashtages:--

#shorts
#cprogramming
#learncoding
#beginners
#youtubeshorts
#carryminati
#technicalguruji
#freefire
#code
#shortsvideo
#codewithharry

Thank you....
Рекомендации по теме
Комментарии
Автор

#include <stdio.h>

int main() {
int num1, num2; // Variables to store the two numbers
char operator; // Variable to store the operator

// Prompt the user to enter the first number
printf("Enter the first number: ");
scanf("%d", &num1);

// Prompt the user to enter the operator (+, -, *, or /)
printf("Enter the operator (+, -, *, or /): ");
scanf(" %c", &operator); // Note the space before %c to consume any leading whitespace

// Prompt the user to enter the second number
printf("Enter the second number: ");
scanf("%d", &num2);

// Perform the operation based on the operator
switch (operator) {
case '+':
printf("Result: %d + %d = %d\n", num1, num2, num1 + num2);
break;
case '-':
printf("Result: %d - %d = %d\n", num1, num2, num1 - num2);
break;
case '*':
printf("Result: %d * %d = %d\n", num1, num2, num1 * num2);
break;
case '/':
if (num2 == 0) {
printf("Error: Division by zero is not allowed.\n");
} else {
printf("Result: %d / %d = %f\n", num1, num2, (float)num1 / num2);
}
break;
default:
printf("Error: Invalid operator.\n");
}

return 0;
}

Thanks me later

alfiyakhanum
Автор

Kya hum case me number ke jagah symbols use kar sakte he?

sodappalsamyofficial
Автор

Too fast and not so clear pls make it clear

fundogaming
Автор

how to make any digit of calculator dude?

Rehan-tfzb
Автор

This guy just wants to show off that's what

itsjustme