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
#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++
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;
}
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;
}
#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.
#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;
}
#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.
#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();
}
#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();
}
printf("%2#f\n",res);
উত্তরমুছুনplease chk before post here.
#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();
}
#include
উত্তরমুছুন#include
main(){
int a=44,b=77;
int sum;
sum=a+b;
printf("%d",sum);
getch();
}
#include
উত্তরমুছুন#include
main(){
int a=55,b=21,substract;
substract=a-b;
printf("%d",substract);
getch();
}
#include
উত্তরমুছুন#include
main(){
int p=16000000,t=20,Multiplication;
Multiplication=p*t;
printf("%d",Multiplication);
getch();
}
#include
উত্তরমুছুন#include
main(){
int z=545,x=5,Division;
Division=z/x;
getch();
}
#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();
}
#include
উত্তরমুছুন#include
main()
{
int sum;
a=6;
b=9;
sum=a+b;
printf("%d, sum");
getchar();
}
#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();
}
#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;
}
#include
উত্তরমুছুনmain(){
int cord=4;
printf("My First Tune\n");
printf("cord=%d\n",cord);
return 0;
}
#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();
}
#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();
}
#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;
}
#include
উত্তরমুছুনmain()
{
float divition;
a=5;
b=2;
divition=a/b;
printf("%f", divition);
getch();
}
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();
}
#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();
}
#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;
}
#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);
}
}
#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:
}
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;
}
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;
}
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;
}
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;
}
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;
}
#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;
}
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);
}
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:";
}
}
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;
}
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");
}
//*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();
}
//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();
}
#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;
}
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;
}
}
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;
}
}
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;
}
#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;
}
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;
}
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;
}
#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
#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);
}
#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);
}
#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;
}
}
#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);
}
how to i share ?
উত্তরমুছুন#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);
}
#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);
}
hlw
উত্তরমুছুন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
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.
//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;
}
//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;
}
#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);
}
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;
}
#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);
}
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
https://drive.google.com/open?id=0Byxq3aat_mNSUDgtczBVc2FpQWM
উত্তরমুছুনhttps://drive.google.com/open?id=0BzKpnVbF4fc3NHhIeE9iMGIxWmc
উত্তরমুছুনhttps://drive.google.com/open?id=0B3bVD5Ppt_STalBiZTc5NVFlTFE
উত্তরমুছুনhttps://www.dropbox.com/s/ur960ibbnyve3q2/calculetar.cpp?dl=0
উত্তরমুছুনhttps://drive.google.com/open?id=0Bw0-FMVCC94QZzR4b2FVbzZ0VzQ
উত্তরমুছুনhttps://drive.google.com/file/d/0B0Llv4Ca9Ln6ZWNld1RwYmhOSlU/view?usp=sharing
উত্তরমুছুনhttps://drive.google.com/file/d/0B0Llv4Ca9Ln6MGhZd2tFM0QtWEE/view?usp=sharing
উত্তরমুছুনAsma Rahman
উত্তরমুছুনID:201610254
https://drive.google.com/file/d/0BzTqZMBWR6eOVDBkRTBIZThab3c/view
https://drive.google.com/file/d/0BzTqZMBWR6eOVDBkRTBIZThab3c/view
উত্তরমুছুনhttps://www.dropbox.com/s/39de6fy4lmxuapv/cal.cpp?dl=0
উত্তরমুছুনcorrection one;
উত্তরমুছুনhttps://drive.google.com/file/d/0B0Llv4Ca9Ln6RGh6dnNDQU16LU0/view?usp=sharing
ID : 201620195
উত্তরমুছুনhttps://drive.google.com/open?id=0B9K31ospCyFjb0xLUkl4VFQ4aUE
https://drive.google.com/open?id=0BzTqZMBWR6eOVDBkRTBIZThab3c
উত্তরমুছুনid no:201610259
উত্তরমুছুনname : jahirul islam
https://drive.google.com/open?id=0B8CpW2ga6ah0NVZBTWVybHFkV1U
ID:201610456
উত্তরমুছুনname:MD USUF MIA
solution link:
https://drive.google.com/open?id=0B_PIGnOMR0K2OGNibU5CVGE4WHM
123
উত্তরমুছুনhttps://drive.google.com/open?id=0B97tDB8iESNCdndtQnE2bFFTbGM
উত্তরমুছুনMd Nadim Khandaker
উত্তরমুছুনID: 201630510
https://drive.google.com/drive/my-drive
Md Nadim Khandaker
উত্তরমুছুনID: 201630510
https://drive.google.com/drive/my-drive
ID:201520552
উত্তরমুছুনhttps://drive.google.com/open?id=0B5pG0kIjzgEKTlEyVUtibVZPZ2c
ID:201520552
উত্তরমুছুনhttps://drive.google.com/open?id=0B5pG0kIjzgEKQUdYT0YzWkdhUk0
ID 201610456
উত্তরমুছুনUSUF MIA
https://drive.google.com/open?id=0B_PIGnOMR0K2OGNibU5CVGE4WHM
1.https://drive.google.com/open?id=0B7UQyRdu6h2wNUpnQmU1R2kyU1U
উত্তরমুছুন2.https://drive.google.com/open?id=0B7UQyRdu6h2wRXlodFExY2xJeWc
Id:201620318
উত্তরমুছুনhttps://drive.google.com/open?id=0B2gcteJZycWoQzZDWHpHajRsbjA
Id:201620318
উত্তরমুছুনhttps://drive.google.com/open?id=0B2gcteJZycWoYmJaWF9UZEJwdFE
https://drive.google.com/open?id=0Byxq3aat_mNSb2hEOF83bUxJSjA
উত্তরমুছুন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);
}
https://drive.google.com/open?id=0BxajN_bZJJw0Z1lrWjVPTUxpNjQ
উত্তরমুছুনId= 201710494
উত্তরমুছুনhttps://www.dropbox.com/s/yakutye4i9jchv2/prob%201.cpp?dl=0
ID : 201620128
উত্তরমুছুন1. https://drive.google.com/open?id=0B0ZDK2wgeHVWSGYtYWZIZnB3SnM
2. https://drive.google.com/open?id=0B0ZDK2wgeHVWWUY0NjM5WjlXVnM
https://drive.google.com/open?id=0B3npeIy0YyePQ1hHVHRSM043RWs
উত্তরমুছুনhttps://www.dropbox.com/s/iwjesre8crnztsk/hw.cpp?dl=0
উত্তরমুছুনhttps://www.dropbox.com/s/iwjesre8crnztsk/hw.cpp?dl=0
উত্তরমুছুনhttps://drive.google.com/open?id=0B2Kd5YiufNdVV3hiaWRJY3RoR2c
উত্তরমুছুনhttps://drive.google.com/open?id=0B5eevQy6QwSOOF92WTF2Nm5TekE
উত্তরমুছুনName: Bithi Paul, ID:201631161
https://drive.google.com/open?id=0B5eevQy6QwSOOF92WTF2Nm5TekE
উত্তরমুছুনName: Bithi Paul, ID:201631161
ID:-201610058
উত্তরমুছুন1.https://drive.google.com/open?id=0B7UQyRdu6h2wNUpnQmU1R2kyU1U
2.https://drive.google.com/open?id=0B7UQyRdu6h2wRXlodFExY2xJeWc