### 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:

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;
}

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();
}

1. /*Calculator*/
#include
#include
main(){
printf("calcultor\n");
float a,b,sum,mul,sub,div,mod;
char o;
printf("\nOperator : ");
scanf("%c",&o);
printf("Enter value for First Number: ");
scanf("%f",&a);

printf("\nEnter value for Second Number: ");
scanf("%f",&b);
switch(o){

case '+':sum=a+b;printf("The sum is : %.2f",sum);break;
case '-':sub=a-b;printf("The sub is : %.2f",sub);break;
case '*':mul=a*b;printf("The mul is : %.2f",mul);break;
case '/':div=a/b;printf("The rat is : %.2f",div);break;
default:printf("Invalid Operator!!!!");
}
}

2. #include

main()
{
int a,b,c;
char o;
float a1,b1,c1;
printf("____Calculator____\n");

scanf("%d%c%d",&a,&o,&b);

if(o == '+')
{
c = a + b;
}

else if(o == '-')
{
c = a - b;
}
else if(o == '/')
{
a1 = a;
b1 = b;

c1 = a1 / b1;
}
else if(o == '*')
{
c = a * b;
}
else if(o == '%')
{
c = a % b;
}
else
{
printf("You Are Not Use Arithmetic Oprater.");
exit(0);
}

if(o == '+' || o == '-' || o == '*' || o == '%')
{
printf("%d %c %d = %d",a,o,b,c);
}
else if(o == '/')
{
printf("%.2f %c %.2f = %.2f",a1,c,b1,c1);
}

}

2. #include
#include
int main()
{
int num1,num2;
float res;
char opt;
calc:
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. printf("%2#f\n",res);

7. #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();
}

8. #include
#include
main(){
int a=44,b=77;
int sum;
sum=a+b;
printf("%d",sum);
getch();
}

9. #include
#include
main(){
int a=55,b=21,substract;
substract=a-b;
printf("%d",substract);
getch();
}

10. #include
#include
main(){
int p=16000000,t=20,Multiplication;
Multiplication=p*t;
printf("%d",Multiplication);
getch();
}

11. #include
#include
main(){
int z=545,x=5,Division;
Division=z/x;
getch();
}

12. #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();
}

13. #include
#include
main()
{
int sum;
a=6;
b=9;
sum=a+b;
printf("%d, sum");
getchar();
}

14. #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();
}

15. #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;
}

16. #include
main(){
int cord=4;
printf("My First Tune\n");
printf("cord=%d\n",cord);
return 0;
}

17. #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();
}

18. #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);
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();
}

19. #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;
}

20. #include
main()
{
float divition;
a=5;
b=2;
divition=a/b;
printf("%f", divition);
getch();
}

21. 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.

#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();
}

22. #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();
}

23. #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;
}

1. Manoshe be carefull about syntax error..Wish ur gud luck.

24. #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);
}
}

25. #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;
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:
}

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;
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;
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;
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;
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;
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;
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. 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;
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;
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. 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;
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;
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;
}

31. #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;
}

32. 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);
}

33. 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:";
}
}

34. 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;
}

35. 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");
}

36. //*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 subtraction();
void multiply();
void divide();

};
arithmetic::arithmetic()
{

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

}
arithmetic::~arithmetic()
{

}
{
res=num1+num2;
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.subtraction();
ob.multiply();
ob.divide();
}

37. //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();
}

38. #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;
}

39. 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;
}
}

40. 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;
}
}

41. 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;
}

42. #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;
}

43. using c++

#include

using namespace std;

class Calculator
{
public:
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;
}

44. 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;
}

45. #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

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

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);

}

48. #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;
}
}

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. how to i share ?

51. #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);

}

52. #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);

}

53. 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

54. 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.

55. //First

#include
using namespace std;
int main()
{
int a,b,result;
char Operator;
cout<<"Enter your first number : "<>a;
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;
}

56. //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;
}

57. #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);
}

58. 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;
}

59. #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);

}

60. Summer 2017
ID#201610042

Answer to the Question No 1:

64. https://www.dropbox.com/s/ur960ibbnyve3q2/calculetar.cpp?dl=0

68. Asma Rahman
ID:201610254

70. https://www.dropbox.com/s/39de6fy4lmxuapv/cal.cpp?dl=0

71. correction one;

72. ID : 201620195

74. id no:201610259
name : jahirul islam

75. ID:201610456
name:MD USUF MIA

ID: 201630510

ID: 201630510

79. ID:201520552

80. ID:201520552

81. ID 201610456
USUF MIA

83. Id:201620318

84. Id:201620318

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);
}

88. Id= 201710494
https://www.dropbox.com/s/yakutye4i9jchv2/prob%201.cpp?dl=0

89. ID : 201620128

91. https://www.dropbox.com/s/iwjesre8crnztsk/hw.cpp?dl=0

92. https://www.dropbox.com/s/iwjesre8crnztsk/hw.cpp?dl=0