How to create a simple calculator in C programming

preview_player
Показать описание
From this tutorial you can learn easily how to design a basic calculator in c. This is very easy to design a calculator in C programming. Here I describe all the things step by step. So watch this video and If you have any question please write in the comment section.

###### My other video tutorials######
101 C programming for beginners:

Pattern printing tutorials in C:

Learn data structure from beginning to end:

 -~-~~-~~~-~~-~-
#SlideHunt
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

you're video thumbnail is misleading, putting a Gui calculator in the thumbnail and giving a console abc calc is really a cheap trick. Please, be honest and correct your title and thumbnail. it's a console app no GUI. I'll make it up to you immediately...a total dislike of course.

qantum
Автор

Dear what is the name of application...like one is turbo c++ which one you are using...

Deenislam
Автор

Thanks a lot Vaia for this awesome video .. A few moments ago I just created a calculator using ur instruction ..Thanks again

davidviki
Автор

Thank you for uploading this (I know it's from 2015). I had to look up a replacement for conio.h as it's not a part of most compilers by default. I ended up just using scanf instead which seemed to get the job done nicely.

CodeGoblin
Автор

your division doesn't show the rest simply add
rest=num1%num2
or result=(float)(num1/num2) for the whole thing

joja
Автор

thank u for making this video
but i have a quastion :
if we want to keep on or continue with
previous number that be calculate
what should we for that?

alimadadi
Автор

which software you used here for coding

biplavbhandari
Автор

❤️❤️❤️❤️❤️ This was really helpful 😶 thank you for the video may you get a lot of subs

uzairmisakialtaf
Автор

getche() cause problems for me cause i use operator as character
ex: printf("press + for addition")
when i want to repeat it reads the + automatically and asks for the first number wich means i can't choose operator again because of the getche() any solution or should i change to int n; like he did
i would prefer a solution plz

joja
Автор

hello,
i don't want to be mean, but there is a mistake in your code :
you declared the result as an int but the problem is that in case of a devision the program will not be able to store the number if it got a point in it exemple:
3/2=1.5 but your program will store only 1 in the result since it can't store float variables.
aside from that nice video :)

aymaneshock
Автор

can I do this for a computer project plz reply

SaadMaazH
Автор

Is this an example of nested switch case??

priyankapc
Автор

Why didn't you use a char variable? For example user will enter '+' instead of 1.

happywin
Автор

Which compiler should be used in c or c++ programming?

rukmanibarman
Автор

sir my answer is an integer i want my answer as areal number please help me

babusingla
Автор

My skill in coding is way way below amateur, but when i tried to do this i'd say it is 4.5/10, but helpful though. I used the visual studio 2017, there were 2 commands that you will not able to execute just because there's another "form" of it, idk. They were scanf must be scanf_s and getche must be _getch. Just sharing :)

muhammadhazmibinonn
Автор

I like it
ur voice is very understandable

gsrathorex
Автор

this is a simple calculator
#include <stdio.h>
int main ()
{

printf("Enter First Number\n");
int sum, mul, cube, square;
float div;
int a, b;
scanf("%d", &a);
printf("Enter Next Number\n");
scanf("%d", &b);

sum = a + b;
div = a / b;
mul = a * b;
cube = sum * sum * sum;
square = sum * sum;

printf("Sum = %d", sum);
printf("Div = %f", div);
printf("Mul = %d", mul);
printf("Cube = %d", cube);
printf("Square = %d", square);

return 0;


}

itzirondroid
Автор

what if we enter num2 0 for division ...

MeHdi-zgxs
Автор

If we want to create a Calculator in C++ what changes we have to make.

shubhamsinha