Write a program performing as calculator which allows all Arithmetic Operators with operands as input

1. Write a C program for performing as calculator which allows all Arithmetic Operators with operands from terminal. Few Input and Output sample are given below:

Recommended: Study Char/Char Array in C/C++           
        
            Sample Input: 1 + 4
            Sample Output: 5

            Sample Input: 8 % 2
            Sample Output: 0

            Sample Input: 6 / 2
            Sample Output: 3

            Sample Input: 5 / 2
            Sample Output: 2.5


Source code in c:

#include<stdio.h>
#include<conio.h>
main()
{
int a,b,z,x,w,h;
char c;
float y,m=0.0;

printf("\nWelcome To My Calculator\n");
AB:
printf("\nenter to calculate (Ex:2+2)\n");
scanf("%d%c%d",&a,&c,&b);
z=(a+b);
x=(a*b);
w=(a-b);
h=(a%b);
y=(a/b);
m=y;
switch(c)
{
case '+' : printf("%d+%d=%d",a,b,z);
break;
case '-' : printf("%d-%d=%d",a,b,w);
break;
case '*' : printf("%d*%d=%d",a,b,x);
break;
case '/' : printf("%d/%d=%2.3f",a,b,m);
break ;
case '%' : printf("%d %d=%d",a,b,h);
break ;
default : printf("error syntax");
break ;
}
goto AB;
getch();
}

Source Code in C++

#include<iostream>
using namespace std;
int main()
{
    int a,b,sum;
    char oper;
    cout<<"Enter an equation to Perform : "<<endl;
    cin>>a;
    cin>>oper;
    cin>>b;
    if(oper=='+')
        sum=a+b;
    else if(oper=='-')
        sum=a-b;
    else if(oper=='*')
        sum=a*b;
    else if(oper=='/')
        sum=a/b;
    cout<<sum;
}

2. Write a C / C++ program for performing all Arithmetic Operation using Arithmetic Operator. The program will take Integer input from terminal as operand.Hints: C= a+b, Here 'a' and 'b' are operand, '=' is assignment operator, and '+' is arithmetic operator.


Source Code in C++

#include<iostream>
using namespace std;
int main()
{
    int b,c,d;
    cin>>b;
    cin>>c;
    d=b+c;
    cout<<d<<endl;
    d=b-c;
    cout<<d<<endl;
    d=b*c;
    cout<<d<<endl;
    d=b/c;
    cout<<d<<endl;
}

98 মন্তব্যসমূহ

  1. #include
    #include
    main()
    {
    int a,b,z,x,w,h;
    char c;
    float y,m=0.0;

    printf("\nWelcome To My Calculator\n");
    AB:
    printf("\nenter to calculate (Ex:2+2)\n");
    scanf("%d%c%d",&a,&c,&b);
    z=(a+b);
    x=(a*b);
    w=(a-b);
    h=(a%b);
    y=(a/b);
    m=y;
    switch(c)
    {
    case '+' : printf("%d+%d=%d",a,b,z);
    break;
    case '-' : printf("%d-%d=%d",a,b,w);
    break;
    case '*' : printf("%d*%d=%d",a,b,x);
    break;
    case '/' : printf("%d/%d=%2.3f",a,b,m);
    break ;
    case '%' : printf("%d %d=%d",a,b,h);
    break ;
    default : printf("error syntax");
    break ;
    }
    goto AB;
    getch();
    }
    By Mahadi.

    উত্তরমুছুন
  2. #include
    #include
    int main()
    {
    int num1,num2;
    float res;
    char opt;
    calc:
    printf("enter your value to calculate\n");
    scanf("%d%c%d",&num1,&opt,&num2);

    switch(opt)
    {
    case '+':res=num1+num2;
    printf("=%f\n",res);
    break;
    case '-':res=num1-num2;
    printf("=%f\n",res);
    break;
    case '*': res=num1*num2;
    printf("=%f\n",res);
    break;
    case '%':res=num1%num2;
    printf("=%f\n",res);
    break;
    case '/':(float)res=(float)num1/(float)num2;
    printf("=%f\n",res);
    break;
    default : printf("error ! enter valid sign\n");
    break;
    }
    goto calc;
    getch();
    return 0;
    }

    উত্তরমুছুন
  3. #include
    main()
    {
    int num1, num2;
    float res;
    char ch;
    cal:
    scanf("%d",&num1);
    scanf("%c",&ch);
    scanf("%d",&num2);
    switch(ch)
    {
    case '+' :res=num1+num2;
    break;
    case '%' :res=num1%num2;
    break;
    case '/' :(float)res=(float)num1/(float)num2; break;
    }
    printf("\n=%.2f",res);
    goto cal;
    getch();
    return 0;
    }


    Here just modify short way.

    উত্তরমুছুন
  4. #include
    main()
    {
    int num1,num2;
    float res;
    char ch;
    scanf("%d %c %d", &num1,&ch,&num2);
    switch(ch)
    {
    case '+' :
    res= num1 +num2;
    break;
    case '%' :
    res= num1%num2;
    break;
    case '/' :
    res= (float)num1/ (float) num2;
    break;
    case '-' :
    res= num1- num2;
    break;
    }
    printf("%2f\n",res);
    getch();
    }

    উত্তরমুছুন
  5. #include
    main()
    {
    int num1,num2,counter=0;
    float res=0;
    float temp1,temp2;

    char ch;
    samira:
    scanf("%d %c %d", &num1,&ch,&num2);
    switch(ch)
    {
    case '+':
    res=num1+num2;
    break;
    case '%':
    res=num1%num2;
    break;
    case '/':
    temp1=num1;
    temp2=num2;
    res=temp1/temp2;
    break;
    case '-':
    res=num1-num2;
    break;
    }
    printf("%2#f\n",res);
    counter++;

    if (counter<=5) goto samira;

    getch();
    }

    উত্তরমুছুন
  6. #include
    main()
    {
    int num1,num2;
    float res;
    char ch;
    scanf("%d %c %d", &num1,&ch,&num2);
    switch(ch)
    {
    case '+' :
    res= num1 +num2;
    break;
    case '%' :
    res= num1%num2;
    break;
    case '/' :
    res= (float)num1/ (float) num2;
    break;
    case '-' :
    res= num1- num2;
    break;
    }
    printf("%2f\n",res);
    getch();
    }

    উত্তরমুছুন
  7. #include
    #include
    main(){
    int a=44,b=77;
    int sum;
    sum=a+b;
    printf("%d",sum);
    getch();
    }

    উত্তরমুছুন
  8. #include
    #include
    main(){
    int a=55,b=21,substract;
    substract=a-b;
    printf("%d",substract);
    getch();
    }

    উত্তরমুছুন
  9. #include
    #include
    main(){
    int p=16000000,t=20,Multiplication;
    Multiplication=p*t;
    printf("%d",Multiplication);
    getch();
    }

    উত্তরমুছুন
  10. #include
    #include
    main(){
    int z=545,x=5,Division;
    Division=z/x;
    getch();
    }

    উত্তরমুছুন
  11. #include
    #include
    main(){
    int i;
    float x[10],value,total=0.0;
    clrscr();
    for(i=0;i<10;i++)
    scanf("%f",&x[i]);
    x[i]=value;
    for(i=0;i<10;i++)
    {
    total=total+x[i];
    }
    for(i=0;i<10;i++)
    {
    printf("\nx[%2d] =%f",i+1,x[i]);
    }
    printf("\n%f",total);
    getch();
    }

    উত্তরমুছুন
  12. #include
    #include
    main()
    {
    int sum;
    a=6;
    b=9;
    sum=a+b;
    printf("%d, sum");
    getchar();
    }

    উত্তরমুছুন
  13. #include
    main(){
    int i=0,sum=0,array[10],ind;
    while(i<10)
    {
    scanf("%d",&array[i]);
    sum=sum+array[i];
    i=i+1;
    }
    printf("sum=%d\n",sum);
    ind=5;
    printf("array[%d]=%d\n",ind,array[ind]);
    getchar();
    }

    উত্তরমুছুন
  14. #include
    int main()}
    int i=0,sum=0,val;
    while(i<20)
    {
    scanf("%d",&val);
    sum=sum+val;
    i=i+2;
    }
    printf("sum=%d\n",sum);
    return 0;
    }

    উত্তরমুছুন
  15. #include
    main(){
    int cord=4;
    printf("My First Tune\n");
    printf("cord=%d\n",cord);
    return 0;
    }

    উত্তরমুছুন
  16. #include
    #include
    main()
    {
    int i;
    printf("\nEnter Year:");
    scanf("%d",&i);
    if((i%4==0)&&(i%100!=0))
    {
    printf("This Year is leap Year")
    }
    else
    {
    printf("This Year is not leap Year");
    }
    getch();
    }

    উত্তরমুছুন
  17. #include
    #include
    main()
    {
    int Gp1,Gp2,Gp3,Gp4,Gp5;
    float i;
    printf("\n\nEnter 5 subject number:");
    scanf("%d %d %d %d %d",&Gp1,&Gp2,&Gp3,&Gp4,&Gp5);
    i=((Gp1+Gp2+Gp3+Gp4+Gp5)/5);
    printf("\n\n\n\naverage is :%f",i);
    printf("Your GPA=");
    if((i>=80)&&(i<=100))
    printf("A+");
    else if((i>=75)&&(i<=79))
    printf("A");
    else if((i>=70)&&(i<=74))
    printf("A-");
    else if((i>=65)&&(i<=69))
    printf("B+");
    else if((i>=60)&&(i<=64))
    printf("B");
    else if((i>=55)&&(i<=59))
    printf("B-");
    else if((i>=50)&&(i<=54))
    printf("C+");
    else if((i>=45)&&(i<=49))
    printf("C");
    getch();
    }

    উত্তরমুছুন
  18. #include
    #include
    int main()
    {
    int i,sum,arr[10];
    for(i=sum=0; i<10; i++)
    {
    scanf("%d",&arr[i];
    sum6+=arr[i];
    }
    printf("sum=%d\n", sum);
    getch();
    return 0;
    }

    উত্তরমুছুন
  19. #include
    main()
    {
    float divition;
    a=5;
    b=2;
    divition=a/b;
    printf("%f", divition);
    getch();
    }

    উত্তরমুছুন
  20. Write a program from given a series circuit; which has ground floor; 3 resistance & a voltage.

    1.Find out total resistance.
    2.Find out total current flow.
    3.Find out potential difference between two point's.
    4.Find out total power supplied.



    Answer:

    #include
    #include
    main(){
    int r, i, v1, p;
    int r1=2; r2=3, r3=1, v=12;
    r=r1+r2+r3;
    i=v/r;
    v1=i*r1;
    p=v*i;
    printf("Total resistance r=%d\n",r);
    printf("Total current flow i=%d\n",i);
    printf("Potential difference between two point's v1=%d\n",v1);
    printf("Total power supplied p=%d\n",p)
    getch();
    }

    উত্তরমুছুন
  21. #include
    main()
    {
    int s1,s2;
    float i;
    char ch;
    scanf("%d %c %d",&s1,&ch,&s2");
    switch(ch)
    {
    case'+':
    i=(s1+s2);
    printf("%f",i);
    break;
    case'-':
    i=(s1-s2);
    printf("%f",i);
    break;
    case'*':
    i=(s1*s2);
    printf("%f",i);
    break;
    case'/':
    i=(s1/s2);
    printf("%f",i);
    break;
    case'%':
    i=(s1%s2);
    printf("%f",i);
    break;
    }
    getch();
    }

    উত্তরমুছুন
  22. #include
    main()
    {
    int a,b,c;
    float res;
    char sign;
    home:
    printf("\nEnter the funcations: ");
    scanf("%d%c%d",&a,&sign,&b);
    switch(sign)
    {
    case '+':
    res=a+b;
    printf("\nThe result is: %0.2lf\n",res);
    break;
    case '-':
    res=a-b;
    printf("\nThe result is: %0.2lf\n",res);
    break;
    case '/':
    res=a/b;
    printf("\nThe result is: %0.2lf\n",res);
    break;
    case '*':
    res=a*b;
    printf("\nThe result is: %0.2lf\n",res);
    break;
    }
    goto home;
    }

    উত্তরমুছুন
  23. #include
    int main()
    {
    int a,b,sum;
    char oper[2];
    printf("Enter an equation to perform:\n ");
    scanf("%d%s%d",&a,&oper,&b);
    if(oper[0]=='+')
    sum=a+b;
    else if(oper[0]=='-')
    sum=a-b;
    else if(oper[0]=='*')
    sum=a*b;
    else if(oper[0]=='/')
    sum=a/b;
    {
    printf("The result is %d\n",sum);
    }
    }

    উত্তরমুছুন
  24. #include
    #include
    void main()
    {
    int a,b,c,d;
    clrscr();
    printf("Enter the values of a and b:");
    scanf("%d%d" ,&a,&b);
    printf(" Enter your choice between 1 to 5 /n");
    scanf("%d , &d);

    switch(d)
    {
    case 1;
    c=a+b;
    printf(" Addition=%d", c);
    break:
    case 2;
    c=a-b;
    printf(" Substraction=%d" , c);
    break:
    case 3;
    c=a*b;
    printf(" Multiplication=%d", c);
    break:
    case 4;
    c=a/b;
    printf(" Divide=%d", c);
    break:
    case 5;
    c=a%b;
    printf(" Remainder=%d",c );
    break:
    default:
    printf(" Invalid Result");
    break:
    }

    উত্তরমুছুন
  25. Q=Write a C / C++ program for performing all Arithmetic Operation using Arithmetic
    Operator. The program will take Integer input from terminal as operand.

    using the program Source Code in C


    #include
    int main()
    {
    int a,b,c;
    Scanf("%d",&a);
    Scanf("%d",&b);
    c=a+b;
    printf("Enter the value of addition"C);
    c=a-b;
    printf("Enter the value of subrrction"C);
    d=b*c;
    printf("Enter the value of multipolition"C);
    d=b/c;
    printf("Enter the value of piyision"C);
    braek;
    }


    using the program Source Code in C++


    #include
    using namespace std;
    main()
    {
    int x,y,z;
    cin<<x;
    cin<<y;
    z=x+y;
    cout<<"Enter the elemant of addition="<<z<<end;
    z=x-y;
    cout<<"Enter the elemant of subrrction="<<z<<end;
    z=x*y;
    cout<<"Enter the elemant of multipition="<<z<<end;
    z=x/y;
    cout<<"Enter the elemant of piyision="<<z<<end;
    }

    উত্তরমুছুন
  26. Q=Write a C / C++ program for performing all Arithmetic Operation using Arithmetic
    Operator. The program will take Integer input from terminal as operand.

    using the program Source Code in C


    #include
    int main()
    {
    int a,b,c;
    Scanf("%d",&a);
    Scanf("%d",&b);
    c=a+b;
    printf("Enter the value of addition"C);
    c=a-b;
    printf("Enter the value of subrrction"C);
    d=b*c;
    printf("Enter the value of multipolition"C);
    d=b/c;
    printf("Enter the value of piyision"C);
    braek;
    }


    using the program Source Code in C++


    #include
    using namespace std;
    main()
    {
    int x,y,z;
    cin<<x;
    cin<<y;
    z=x+y;
    cout<<"Enter the elemant of addition="<<z<<end;
    z=x-y;
    cout<<"Enter the elemant of subrrction="<<z<<end;
    z=x*y;
    cout<<"Enter the elemant of multipition="<<z<<end;
    z=x/y;
    cout<<"Enter the elemant of piyision="<<z<<end;
    }

    উত্তরমুছুন
  27. Q=Write a C / C++ program for performing all Arithmetic Operation using Arithmetic
    Operator. The program will take Integer input from terminal as operand.

    using the program Source Code in C


    #include
    int main()
    {
    int a,b,c;
    Scanf("%d",&a);
    Scanf("%d",&b);
    c=a+b;
    printf("Enter the value of addition"C);
    c=a-b;
    printf("Enter the value of subrrction"C);
    d=b*c;
    printf("Enter the value of multipolition"C);
    d=b/c;
    printf("Enter the value of piyision"C);
    braek;
    }


    using the program Source Code in C++


    #include
    using namespace std;
    main()
    {
    int x,y,z;
    cin<<x;
    cin<<y;
    z=x+y;
    cout<<"Enter the elemant of addition="<<z<<end;
    z=x-y;
    cout<<"Enter the elemant of subrrction="<<z<<end;
    z=x*y;
    cout<<"Enter the elemant of multipition="<<z<<end;
    z=x/y;
    cout<<"Enter the elemant of piyision="<<z<<end;
    }

    উত্তরমুছুন
  28. Q=Write a C / C++ program for performing all Arithmetic Operation using Arithmetic
    Operator. The program will take Integer input from terminal as operand.

    using the program Source Code in C


    #include
    int main()
    {
    int a,b,c;
    Scanf("%d",&a);
    Scanf("%d",&b);
    c=a+b;
    printf("Enter the value of addition"C);
    c=a-b;
    printf("Enter the value of subrrction"C);
    d=b*c;
    printf("Enter the value of multipolition"C);
    d=b/c;
    printf("Enter the value of piyision"C);
    braek;
    }


    using the program Source Code in C++


    #include
    using namespace std;
    main()
    {
    int x,y,z;
    cin<<x;
    cin<<y;
    z=x+y;
    cout<<"Enter the elemant of addition="<<z<<end;
    z=x-y;
    cout<<"Enter the elemant of subrrction="<<z<<end;
    z=x*y;
    cout<<"Enter the elemant of multipition="<<z<<end;
    z=x/y;
    cout<<"Enter the elemant of piyision="<<z<<end;
    }

    উত্তরমুছুন
  29. Write a C / C++ program for performing all Arithmetic Operation using Arithmetic
    Operator. The program will take Integer input from terminal as operand.

    using the program Source Code in C


    #include
    int main()
    {
    int a,b,c;
    Scanf("%d",&a);
    Scanf("%d",&b);
    c=a+b;
    printf("Enter the value of addition"C);
    c=a-b;
    printf("Enter the value of subrrction"C);
    d=b*c;
    printf("Enter the value of multipolition"C);
    d=b/c;
    printf("Enter the value of piyision"C);
    braek;
    }


    using the program Source Code in C++


    #include
    using namespace std;
    main()
    {
    int x,y,z;
    cin<<x;
    cin<<y;
    z=x+y;
    cout<<"Enter the elemant of addition="<<z<<end;
    z=x-y;
    cout<<"Enter the elemant of subrrction="<<z<<end;
    z=x*y;
    cout<<"Enter the elemant of multipition="<<z<<end;
    z=x/y;
    cout<<"Enter the elemant of piyision="<<z<<end;
    }

    উত্তরমুছুন
  30. #include
    #include

    using namespace std;

    int main()
    {
    int x,y,result;
    string arithmatic;
    cout<<"enter the first number:";
    cin>>x;
    cout<<"enter the second number:";
    cin>>y;
    cout<<"use one of the four artimatic operations /, *, + or - :";
    cin>>arithmatic;
    if (arithmatic=="/" )
    {
    result=x/y;
    cout<<"x / y ="<<result;
    }
    if (arithmatic == "*")
    {
    result=x*y;
    cout<<"x * y ="<<result;
    }
    if (arithmatic == "+")
    {
    result = x + y;
    cout<<"x+y ="<<result;
    }
    if (arithmatic == "-")
    {
    result = x-y;
    cout<<"x-y ="<<result;
    }
    else
    {

    cout<<"what is this? i said use arithmatic operations!";
    }

    return 0;
    }

    উত্তরমুছুন
  31. Ripon
    ID: 734
    Beatch:47
    //WAP using c function to read from a array and do the sum of all elements from that array
    #include
    using namespace std;

    int digit(int n){


    int t;
    while(n!=0)
    {
    t=n%10;
    n=n/10;
    cout<>num;
    digit(num);
    }

    উত্তরমুছুন
  32. RIPON
    ID 734
    Beatch:47
    //WAP to check number which is divisidable by 9 or not.user function to call and return the value
    #include
    using namespace std;
    int divisible(int r);
    int main()

    {
    int n;
    cout<<"intput the divisible number:";
    cin>>n;
    divisible(n);
    }

    int divisible(int r)
    {
    if(r%9==0)
    {

    cout<<"is a divisible 9:";
    }
    else
    {
    cout<<"is not a divisible:";
    }
    }

    উত্তরমুছুন
  33. RIPON
    ID 734
    Beatch:47
    //Evaluate below equation using c function .sum =x+x^2+x^3+.....+x^n
    #include
    using namespace std;
    #include
    int equo(int a,int b);

    int main(){
    int a,b,equation;
    cout<<"Enter the equation:";
    printf("\n\n");
    cin>>a>>b;

    equation=equo(a,b);
    cout<<"result is="<<equation;
    }


    int equo(int g, int h){
    int sum=0;
    int i,j;

    for(i=1; i<=h; i++){
    int mult=1;
    for(j=1; j<=i; j++){

    mult=mult*g;

    }

    sum+=mult;
    }
    return sum;
    }

    উত্তরমুছুন
  34. RIPON
    ID 734
    Beatch:47
    //WAP using function to check whether the given input is divisible by 5 or not
    #include
    using namespace std;
    #include
    int main()

    {
    int n;
    cout<<"Enter you number:"<>n;
    if(n%5==0)
    {
    cout<<"is divisible 5";
    }
    else
    {
    cout<<"is not divisible 5";
    }
    printf("\n");
    }

    উত্তরমুছুন
  35. //*WAP a to find arithmetic operator using constructor*//


    #include
    using namespace std;
    class arithmetic
    {
    public:
    int num1,num2,counter=0;
    float res=0;
    arithmetic();
    ~arithmetic();
    void addition();
    void subtraction();
    void multiply();
    void divide();

    };
    arithmetic::arithmetic()
    {

    cout<<"Enter two integer number :"<>num1>>num2;


    }
    arithmetic::~arithmetic()
    {

    }
    void arithmetic::addition()
    {
    res=num1+num2;
    cout<<"The addition is: ";
    cout<<res<<endl;

    }
    void arithmetic::subtraction()
    {
    res=num1-num2;
    cout<<"The subtraction is: ";
    cout<<res<<endl;
    }
    void arithmetic::multiply()
    {
    res=num1*num2;
    cout<<"the multiplication is: ";
    cout<<res<<endl;
    }
    void arithmetic::divide()
    {
    res=num1/num2;
    cout<<"The division is: ";
    cout<<res<<endl;
    }
    int main()
    {
    arithmetic ob;
    ob.addition();
    ob.subtraction();
    ob.multiply();
    ob.divide();
    }

    উত্তরমুছুন
  36. //Write a program performing as calculator which allows all Arithmetic Operators with operands as input

    #include
    #include
    using namespace std;
    class numchk
    {
    public:
    int num1,num2;
    float res;
    char ch;
    numchk();
    ~numchk();
    void calculation();
    };
    numchk:: numchk()
    {
    cin>>num1;
    cin>>ch>>num2;
    }
    numchk::~ numchk()
    {
    //cout<<"distructor";
    }
    void numchk::calculation()
    {
    switch(ch)
    {
    case '+' :
    res= num1 +num2;
    break;
    case '%' :
    res= num1%num2;
    break;
    case '/' :
    res= (float)num1/ (float) num2;
    break;
    case '-' :
    res= num1- num2;
    break;
    }
    cout<<res;
    getch();
    }

    main()
    {
    numchk nn;
    nn.calculation();
    }



    উত্তরমুছুন
  37. #include
    using namespace std;

    int main(){
    int number_1, number_2;
    float result;
    char op;

    cout<<"Enter operand 1: ";
    cin>>number_1;

    cout<>op;

    cout<>number_2;


    switch(op)
    {
    case '+' : result = number_1+number_2;
    break;

    case '-' : result = number_1-number_2;
    break;

    case '*' : result = number_1*number_2;
    break;

    case '/' : result = number_1/number_2;
    break;

    case '%' : result = number_1%number_2;
    break;
    }

    cout<<endl<<"Result is: "<<result<<endl;
    return 0;
    }

    উত্তরমুছুন
  38. shah syed mohammad fehir Id:201520314
    #include
    using namespace std;
    int main()
    {
    int a,b;
    cin>>a>>b;
    char c;
    cin>>c;
    switch(c)
    {
    case'+':
    cout<<a+b;
    break;
    case'-':
    cout<<a-b;
    break;
    case'*':
    cout<<a*b;
    break;
    case'/':
    cout<<a/b;
    break;
    default:
    cout<<"invalid";
    break;
    }
    }

    উত্তরমুছুন
  39. Appel mahmud akib Id:201510384

    #include
    using namespace std;
    int main()
    {
    int a,b;
    char op;
    cout<<"Input two integer with oparator: ";
    cin>>a>>op>>b;
    switch(op)
    {
    case'+':
    cout<<a+b;
    break;
    case'-':
    cout<<a-b;
    break;
    case'*':
    cout<<a*b;
    break;
    case'/':
    cout<<a/b;
    break;
    defeault:
    cout<<"Invalid input";
    break;
    }
    }

    উত্তরমুছুন
  40. using namespace std;
    int main()
    {
    int c,d;
    #include
    cout<<"Input Investment value: ";
    cin>>c;
    cout<<"input percent of Interest: ";
    cin>>d;
    cout<<c+c*b/100;
    }

    উত্তরমুছুন
  41. #include
    using namespace std;
    int main()
    {
    int a,b;
    cout<<"Input Investment value: ";
    cin>>a;
    cout<<"input percent of Interest: ";
    cin>>b;
    cout<<a+a*b/100;
    }

    উত্তরমুছুন
  42. using c++

    #include

    using namespace std;

    class Calculator
    {
    public:
    float add(float i, float j){
    return i+j;
    }
    float mins(float i, float j){
    return i-j;
    }
    float mult(float i, float j){
    return i*j;
    }
    float devide(float i, float j){
    return i/j;
    }
    float modu(int i, int j){
    return i%j;
    }
    float cal();
    };

    float Calculator::cal()
    {
    Calculator obj;
    string a;
    float x, y;
    cout << "Enter every single value or operator press with ENTER or SPACE ! \n";
    cin >> x >> a >> y;
    if (a == "+"){
    cout << "Total between two number --: " << obj.add(x, y);
    }
    else if (a == "-"){
    cout << "Minus between two number --: " << obj.mins(x, y);
    }
    else if (a == "*"){
    cout << "Multiplication between two number --: " << obj.mult(x, y);
    }
    else if (a == "/"){
    cout << "Devide between two number is --: " << obj.devide(x, y);
    }
    else if (a == "%"){
    cout << "Modulas is --: " << obj.modu(x, y);
    }
    else{
    cout << "You enterd wrong input, try again!";
    }
    }

    int main()
    {

    Calculator obj;
    while (true){
    obj.cal();
    cout << "\n";
    }

    return 0;
    }

    উত্তরমুছুন
  43. using C++
    mamun ID 149
    #include
    using namespace std;
    int main()
    {
    int b,c,result;
    cout<<"Enter Your deserve Number you Want :";
    cin>>b>>c;
    result=b+c;
    cout<<"The total is :"<<result<<endl;
    result=b-c;
    cout<<"The Sub is :"<<result<<endl;
    result=b*c;
    cout<<"The mult is :"<<result<<endl;
    result=b/c;
    cout<<"The divide is :"<<result<<endl;
    return 0;
    }

    উত্তরমুছুন
  44. #include
    using namespace std;


    int main()
    {
    int a,b,sum;

    cout <<"Enter the number of a: "<< endl;
    cin >>a;
    cout <<"Enter the number of b: "<< endl;
    cin >>b;
    sum =a+b;
    cout <<"The adding of sum is: "<<sum<< endl;
    sum =a-b;
    cout <<"The substruct of sum is: "<<sum<< endl;
    sum =a*b;
    cout <<"The multiplication of sum is: "<<sum<< endl;
    sum =a/b;
    cout << "The devide of sum is: "<<sum<< endl;

    return 0;
    }


    id:201510992

    উত্তরমুছুন
  45. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  46. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  47. #include
    using namespace std;
    int main()
    {
    int a,b;
    char op;
    cout<<"Input two integer with oparator: ";
    cin>>a>>op>>b;
    switch(op)
    {
    case'+':
    cout<<a+b;
    break;
    case'-':
    cout<<a-b;
    break;
    case'*':
    cout<<a*b;
    break;
    case'/':
    cout<<a/b;
    break;
    defeault:
    cout<<"Invalid input";
    break;
    }
    }

    উত্তরমুছুন
  48. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  49. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  50. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  51. Programming is very interesting and creative thing if you do it with love. Your blog code helps a lot to beginners to learn programming from basic to advance level. I really love this blog because I learn a lot from here and this process is still continuing.
    Love from Pro Programmer

    উত্তরমুছুন
  52. Programming is combination of intelligent and creative work. Programmers can do anything with code. The entire Programming tutorials that you mention here on this blog are awesome. Beginners Heap also provides latest tutorials of Programming from beginning to advance level.
    Be with us to learn programming in new and creative way.

    উত্তরমুছুন
  53. //First

    #include
    using namespace std;
    int main()
    {
    int a,b,result;
    char Operator;
    cout<<"Enter your first number : "<>a;
    cout<<"Enter your operator : "<>Operator;
    cout<<"Enter your second number : "<>b;
    if(Operator=='+')
    result=a+b;
    else if(Operator=='-')
    result=a-b;
    else if(Operator=='*')
    result=a*b;
    else if(Operator=='/')
    result=a/b;
    cout<<"Result of your " <<"("<< Operator<<")" << "oparetion is : " <<result<<endl;
    }

    উত্তরমুছুন
  54. //second


    #include
    using namespace std;
    int main()
    {
    int a,b,c;
    cout<<"Enter two numbers : "<>a>>b;
    c=a+b;
    cout<<"Summation of these two number is : " <<c<<endl;
    c=a-b;
    cout<<"Deduct of these twonumber is : " <<c<<endl;
    c=a*b;
    cout<<"Multiplication of these two number is : " <<c<<endl;
    c=a/b;
    cout<<"Division of these two number is : " <<c<<endl;
    }

    উত্তরমুছুন
  55. #include
    int main(){
    int a,b,c,d,p,q;
    printf("enter the fist value=");
    scanf("%d",&a);
    printf("enter the 2nd value=");
    scanf("%d",&b);
    c=a+b;
    printf("%d\n",c);
    d=a-b;
    printf("%d\n",d);
    p=a*b;
    printf("%d\n",p);
    q=a/b;
    printf("%d\n",q);
    }

    উত্তরমুছুন
  56. mausumi sumi#include
    using namespace std;
    int main(){
    int a,b,c;
    cout<<"enter two numbers"<<a<<b;
    c=a+b;
    cout<<"sumation of these two number is"<<c<<endl;
    c=a-b;
    cout<<"substruction of these two number is"<<c<<endl;
    c=a*b;
    cout<<"multipliction of these two number is"<<c<<endl;
    c=a/b;
    cout<<"division of these twp number is"<<c<<endl;
    }

    উত্তরমুছুন
  57. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  58. Summer 2017
    ID#201610042

    Answer to the Question No 1:

    problem 1: https://drive.google.com/file/d/0B99eePh0LV8gZlhvU0U4WnEzMnc/view?usp=drivesdk

    problem 2: https://drive.google.com/file/d/0B99eePh0LV8gWHcwamhvOE1YWWc/view?usp=drivesdk

    উত্তরমুছুন
  59. https://drive.google.com/open?id=0Byxq3aat_mNSUDgtczBVc2FpQWM

    উত্তরমুছুন
  60. https://drive.google.com/open?id=0BzKpnVbF4fc3NHhIeE9iMGIxWmc

    উত্তরমুছুন
  61. https://drive.google.com/open?id=0B3bVD5Ppt_STalBiZTc5NVFlTFE

    উত্তরমুছুন
  62. https://drive.google.com/open?id=0Bw0-FMVCC94QZzR4b2FVbzZ0VzQ

    উত্তরমুছুন
  63. https://drive.google.com/file/d/0B0Llv4Ca9Ln6ZWNld1RwYmhOSlU/view?usp=sharing

    উত্তরমুছুন
  64. https://drive.google.com/file/d/0B0Llv4Ca9Ln6MGhZd2tFM0QtWEE/view?usp=sharing

    উত্তরমুছুন
  65. Asma Rahman
    ID:201610254

    https://drive.google.com/file/d/0BzTqZMBWR6eOVDBkRTBIZThab3c/view

    উত্তরমুছুন
  66. https://drive.google.com/file/d/0BzTqZMBWR6eOVDBkRTBIZThab3c/view

    উত্তরমুছুন
  67. correction one;

    https://drive.google.com/file/d/0B0Llv4Ca9Ln6RGh6dnNDQU16LU0/view?usp=sharing

    উত্তরমুছুন
  68. ID : 201620195
    https://drive.google.com/open?id=0B9K31ospCyFjb0xLUkl4VFQ4aUE

    উত্তরমুছুন
  69. https://drive.google.com/open?id=0BzTqZMBWR6eOVDBkRTBIZThab3c

    উত্তরমুছুন
  70. id no:201610259
    name : jahirul islam

    https://drive.google.com/open?id=0B8CpW2ga6ah0NVZBTWVybHFkV1U

    উত্তরমুছুন
  71. ID:201610456
    name:MD USUF MIA
    solution link:
    https://drive.google.com/open?id=0B_PIGnOMR0K2OGNibU5CVGE4WHM

    উত্তরমুছুন
  72. https://drive.google.com/open?id=0B97tDB8iESNCdndtQnE2bFFTbGM

    উত্তরমুছুন
  73. Md Nadim Khandaker
    ID: 201630510
    https://drive.google.com/drive/my-drive

    উত্তরমুছুন
  74. Md Nadim Khandaker
    ID: 201630510
    https://drive.google.com/drive/my-drive

    উত্তরমুছুন
  75. ID:201520552
    https://drive.google.com/open?id=0B5pG0kIjzgEKTlEyVUtibVZPZ2c

    উত্তরমুছুন
  76. ID:201520552
    https://drive.google.com/open?id=0B5pG0kIjzgEKQUdYT0YzWkdhUk0

    উত্তরমুছুন
  77. ID 201610456
    USUF MIA
    https://drive.google.com/open?id=0B_PIGnOMR0K2OGNibU5CVGE4WHM

    উত্তরমুছুন
  78. 1.https://drive.google.com/open?id=0B7UQyRdu6h2wNUpnQmU1R2kyU1U
    2.https://drive.google.com/open?id=0B7UQyRdu6h2wRXlodFExY2xJeWc

    উত্তরমুছুন
  79. Id:201620318
    https://drive.google.com/open?id=0B2gcteJZycWoQzZDWHpHajRsbjA

    উত্তরমুছুন
  80. Id:201620318
    https://drive.google.com/open?id=0B2gcteJZycWoYmJaWF9UZEJwdFE

    উত্তরমুছুন
  81. https://drive.google.com/open?id=0Byxq3aat_mNSb2hEOF83bUxJSjA

    উত্তরমুছুন
  82. Md Nadim Khandaker
    ID: 201630510

    #include
    using namespace std;
    class oper
    {
    public:
    void calculate(int a,int b,char c,float sum)
    {
    if(c=='+')
    sum=a+b;
    else if(c=='-')
    sum=a-b;
    else if(c=='*')
    sum=a*b;
    else if(c=='/')
    sum=(float)a/b;
    else if(c=='%')
    sum=a%b;
    cout<>a>>c>>b;
    oper p;
    p.calculate(a,b,c,sum);
    }

    উত্তরমুছুন
  83. Id= 201710494
    https://www.dropbox.com/s/yakutye4i9jchv2/prob%201.cpp?dl=0

    উত্তরমুছুন
  84. ID : 201620128

    1. https://drive.google.com/open?id=0B0ZDK2wgeHVWSGYtYWZIZnB3SnM

    2. https://drive.google.com/open?id=0B0ZDK2wgeHVWWUY0NjM5WjlXVnM

    উত্তরমুছুন
  85. https://drive.google.com/open?id=0B3npeIy0YyePQ1hHVHRSM043RWs

    উত্তরমুছুন
  86. https://drive.google.com/open?id=0B2Kd5YiufNdVV3hiaWRJY3RoR2c

    উত্তরমুছুন
  87. https://drive.google.com/open?id=0B5eevQy6QwSOOF92WTF2Nm5TekE
    Name: Bithi Paul, ID:201631161

    উত্তরমুছুন
  88. https://drive.google.com/open?id=0B5eevQy6QwSOOF92WTF2Nm5TekE

    Name: Bithi Paul, ID:201631161

    উত্তরমুছুন
  89. ID:-201610058

    1.https://drive.google.com/open?id=0B7UQyRdu6h2wNUpnQmU1R2kyU1U
    2.https://drive.google.com/open?id=0B7UQyRdu6h2wRXlodFExY2xJeWc

    উত্তরমুছুন
নবীনতর পূর্বতন