How to make calculator using C Programming by Kanai

Result of cal calculator































If you have any problem you can contact on my facebook page or whatsaap group (Link has been given bellow).

//please do not copy this, this is only for learn.
#include<stdio.h>
#include<conio.h>
main()
{
//    clrscr();
    float num1,num2,result;
    char op;
    printf("Enter your first number");
    scanf("%f",&num1);
    printf("Enter your operator as + - * / \n");
    scanf(" %c",&op);
    printf("Enter your second number");
    scanf("%f",&num2);
    switch (op)
    {
    case '-':
        result=num1-num2;
        printf("Your result is %f",result);
        break;
    case '+':
        result=num1+num2;
        printf("Your result is %f",result);
        break;
    case '*':
        result=num1*num2;
        printf("Your result is %f",result);
        break;
    case '/':
        result=num1/num2;
        printf("Your result is %f",result);
        break;
    default:
        printf("your selection is not available right now");
    }
    getchar();
}

এই ব্লগটি থেকে জনপ্রিয় পোস্টগুলি

Swami vivekananda merit-cum scholarship 2019

How to print using C programming By Kanai