Skip to main content

BCA

 //Write a program which performs the addition of three number.

/*#include<iostream>

using namespace std;

int main()

{

int no1,no2,no3,sum;

cout<<"\n Enter The First Number :";

cin>>no1;

cout<<"\n Enter The Second Number :";

cin>>no2;

cout<<"\n Enter The Third Number :";

cin>>no3;

sum=no1+no2+no3;

cout<<"\n The Addition Of Given Three Number Is "<<sum;

return 0;

}*/

//Write a program which calculates the square and cube of two number.

/*#include<iostream>

using namespace std;

int main()

{

int fno,sno;

cout<<"\n Enter The First Number :";

cin>>fno;

cout<<"\n Enter The Second Number :";

cin>>sno;

cout<<"\nThe Squre Of First Number is--->"<<fno*fno;

cout<<"\n The Squre Of Second Number is--->"<<sno*sno;

cout<<"\n The Cube Of First Number--->"<<fno*fno*fno;

cout<<"\n The Cube Of Second Number--->"<<sno*sno*sno;

return 0;

}*/

//Write a program which calculates the area and perimeter of square.

/*#include<iostream>

using namespace std;

int main()

{

float len,area,peri;

cout<<"\n Enter Any Side Of Length Of The Square:=>";

cin>>len;

area=len*len;

cout<<"\n The Area Of Square Is--->"<<area;

peri=(4*len);

cout<<"\n The Perimeter Of Square--->"<<peri;

return 0;

}*/

//Write a program which calculates the area and perimeter of rectangle.

/*#include<iostream>

using namespace std;

int main()

{

int lenR,widR,areaR,periR;

cout<<"\n Enter The length of rectangle :->";

cin>>lenR;

cout<<"\n Enter The width of rectangle :->";

cin>>widR;

areaR=lenR*widR;

cout<<"\n Area Of Rectangle--->"<<areaR;

periR=2*(lenR+widR);

cout<<"\n Perimeter Of Rectangle--->"<<periR;

return 0;

}*/

//------------------------------> Q2-------------------------------->

//. Write a progra which takes the age from the user and prints the message whether he/she is eligible

//. Write a progra which prints the message “Congratulation!!!” if each vaccination was done.


/*#include<iostream>

using namespace std;

int main()

{

int age;

cout<<"\n Hey Dear Enter Your Age ->";

cin>>age;

if(age>=18)

cout<<"\n Congratulation! Your Eligible For Takig Vaccine....!";

}*/

//------------------------------------------------------

//Write a program which decides the given number is even or odd

/*#include<iostream>

using namespace std;

int main()

{

int no;

cout<<"\n Enter The Number --->";

cin>>no;

if(no%2==0)

cout<<"\n Given Number Is Even...."<<no;

else 

cout<<"\n Given Number Is Odd...."<<no;

return 0;

}*/

//. Write a program to find out the given year is leap or not

/*#include<iostream>

using namespace std;

int main()

{

int year;

cout<<"\n Enter The Year --->";

cin>>year;

if(year%4==0)

cout<<"\n"<<year<<" Is The Leap Year";

else

cout<<"\n"<<year<<" Is Not The Leap Year";

return 0;

}*/

//. Write a program which prints the greater number from the given two number

/*#include<iostream>

using namespace std;

int main()

{

int no1,no2;

cout<<"\n Enter The First Number --->";

cin>>no1;

cout<<"\n Enter The Second Number--->";

cin>>no2;

if(no1>no2)

cout<<"First Number Is Greater Than Second Number...."<<no1<<">"<<no2;

else

cout<<"Second Number Is Greater Than First Number...."<<no2<<">"<<no1;

return 0;

}*/

//Write a program which finds the greater number from the given three number

/*#include<iostream>

using namespace std;

int main()

{

int no1,no2,no3;

cout<<"\n Enter The First Number :->";

cin>>no1;

cout<<"\n Enter The Second Number :->";

cin>>no2;

cout<<"\n Enter The Three Number :->";

cin>>no3;

if(no1>no2&&no1>no3)

cout<<"\n The First Number Is Greater  Than From Second Number & Third Number...."<<no1;

else if(no2>no1&&no2>no3)

cout<<"\n The Second Number Is Greater  Than From First Number & Third Number...."<<no2;

else 

cout<<"\n The Third Number Is Greater  Than From Second Number & First Number...."<<no3;

return 0;

}*/

//Write a program in which you entered the percentage of student and then according to the percentage decides the class of the student (First class, second class, pass class or distinction)

//90-100-->TOP

//80-90-->DISTICTION

//70-60--->FIRST CLASS

//60-50--->Second Class 

//50-40--->Third Class 

//40-35--->Pass

//<35 fail

/*#include<iostream>

using namespace std;

int main()

{

int percentage;

cout<<"\nEnter The Percentage :=>";

cin>>percentage;

if(percentage>=90&&percentage<=100)

cout<<"\nCongragulation, Your Topper";

else if(percentage>=80&&percentage<=90)

cout<<"\n First Class";

else if(percentage>=70&&percentage<=80)

cout<<"\n Second Class";

else if(percentage>=60&&percentage<=70)

cout<<"\n Third Class";

else if(percentage>=35&&percentage<=60)

cout<<"\n Pass Class";

else if(percentage>100)

cout<<"\n Enter A Valid Percentage";

else 

cout<<"\nFail";

return 0;

}*/

//Write a program which performs the addition, subtraction, multiplication, division as per the choice entered by the user.

/*#include<iostream>

using namespace std;

int main()

{

int no1,no2,temp,ch;

cout<<"\n Enter Your Choice--->\n1.Addition \n2.Substraction \n3.Multiplication \n4.Dividation....";

cin>>ch;

switch(ch)

{

case 1:

cout<<"\n Enter The First Number :=>";

cin>>no1;

cout<<"\n Enter The Second Number :=>";

cin>>no2;

temp=no1+no2;

cout<<"\n Addition Of "<<no1<<" and "<<no2<<" is "<<temp;

break;

case 2:

cout<<"\n Enter The First Number :=>";

cin>>no1;

cout<<"\n Enter The Second Number :=>";

cin>>no2;

temp=no1-no2;

cout<<"\n Substraction Of"<<no1<<" and "<<no2<<" is "<<temp;

break;

case 3:

cout<<"\n Enter The First Number :=>";

cin>>no1;

cout<<"\n Enter The Second Number :=>";

cin>>no2;

temp=no1*no2;

cout<<"\n Multiplication Of"<<no1<<" and "<<no2<<" is "<<temp;

break;

case 4:

cout<<"\n Enter The First Number :=>";

cin>>no1;

cout<<"\n Enter The Second Number :=>";

cin>>no2;

temp=no1/no2;

cout<<"\n Dividation Of"<<no1<<" and "<<no2<<" is "<<temp;

break;

deafault :

cout<<"\n Enter The Valid Choice...!";

}

return 0;

}*/

//Using Switch statement, write a program that displays the following menu for the food items available to take order from the customer: •B=Burger •F=French-fries •P=Pizza •S=Sandwiches The program inputs the type of food and quantity. It finally displays thetotal charges for the order according to following criteria: •Burger=Rs.200 •French-fries=Rs.50 •Pizza=Rs.500 • Sandwiches= Rs. 150

/*#include<iostream>

using namespace std;

int main()

{

char ch;

cout<<"\nEnter Your Choice ....\nB=Burger \nF=French-fries \nP=Pizza \nS=Sandwiches\n....";

cin>>ch;

switch(ch)

{

case 'B':

cout<<"Burger=Rs.200";

break;

case 'F':

cout<<"French-fries=Rs.50";

break;

case 'P':

cout<<"Pizza=Rs.500";

break;

case 'S':

cout<"\nSandwiches=Rs. 150";

break;

default :

cout<<"\n Enter The Valid Choice....!";

}

return 0;

}*/

//------------------Q3-------------------------

//Write a program which calculates the factorial of a number

/*#include<iostream>

using namespace std;

int main()

{

int no,fact=1;

cout<<"\nEnter The Number :=>";

cin>>no;

do

{

fact*=no;

no--;

}while(no!=0);

cout<<"The Given Number Factorial Is ...."<<fact;

return 0;

}*/

//Write a program which prints that entered number is prime or not

/*#include<iostream>

using namespace std;

int main()

{

int no,prime,check=0;

cout<<"\n Enter The Number :=>";

cin>>no;

for(int i=1;i<=no;i++)

{

if(no%i==0)

{

check++;

}

}

if(check==2)

cout<<"The Given Number Is Prime..."<<no;

else

cout<<"\n The Given Number Is Not Prime"<<no;

return 0;

}*/

//Write a program which checks that given number is palindrome or not

/*#include<iostream>

using namespace std;

int main()

{

int no,reminder,save=0,q=0;

cout<<"\n Enter The Number :=>";

cin>>no;

q=no;

while(no!=0)

{

reminder=no%10;

save=save*10+reminder;

no=no/10;

}

if(q==save)

cout<<"\n Given Number Is Palidrome...!";

return 0;

}*/

//Write down a program to find out the addition from 1 to 10

/*#include<iostream>

using namespace std;

int main()

{

int add=0;

for(int i=1;i<=10;i++)

add+=i;

cout<<"\n The Addition Of 1 To 10 Is "<<add;

return 0;

}*/

//Write down the program which prints the Fibonacci series (i. e. 1 1 2 3 5 8 13 -----)..

/*#include<iostream>

using namespace std;

int main()

{

int a=0,b=1,c=0;

cout<<a;

for (int i=0;i<=10;i++)

{

a=b;

b=c;

c=a+b;

cout<<c<<"";

}

return 0;

}*/

//Write a program which performs the addition, subtraction, multiplication of two matrix by using 2 D array

/*#include<iostream>

using namespace std;

int main()

{

int mat1[2][2],mat2[2][2],save=0,store[2][2],a,b;

cout<<"\n Enter The First Matrix:=>";

for(a=0;a<=1;a++)

{

for(b=0;b<=1;b++)

cin>>mat1[a][b];

}

cout<<"\n Enter The Second Matrix:=>";

for(a=0;a<=1;a++)

{

for(b=0;b<=1;b++)

cin>>mat2[a][b];

}

cout<<"\n First Matrix Is ....!\n";

for(a=0;a<=1;a++)

{

for(b=0;b<=1;b++)

cout<<mat1[a][b]<<"\t";

cout<<"\n";

}

cout<<"\n Second Matrix Is ....!\n";

for(a=0;a<=1;a++)

{

for(b=0;b<=1;b++)

cout<<mat2[a][b]<<"\t";

cout<<"\n";

}

for(a=0;a<=1;a++)//Addition

{

for(b=0;b<=1;b++)

store[a][b]=mat1[a][b]+mat2[a][b];

cout<<endl;

}

cout<<"\n Addition Of Two Matrix....\n";

for(a=0;a<=1;a++)

{

for(b=0;b<=1;b++)

cout<<store[a][b]<<"\t";

cout<<endl;

}

for(a=0;a<=1;a++) //Substraction

{

for(b=0;b<=1;b++)

store[a][b]=mat1[a][b]-mat2[a][b];

cout<<endl;

}

cout<<"\n Substraction Of Two Matrix....\n";

for(a=0;a<=1;a++)

{

for(b=0;b<=1;b++)

cout<<store[a][b]<<"\t";

cout<<endl;

}

for(int m=0;m<=1;m++)

{

for(int o=0;o<=1;o++)

{

    for(int i=0;i<=1;i++)

    {

      save+=mat1[m][i]*mat2[i][o];  

}

store[m][o]=save;

save=0;

}

}

cout<<"\n Multiplication Of Two Matrix Is As Follow \n";

for(int k=0;k<=1;k++)

{

for(int r=0;r<=1;r++)

cout<<store[k][r]<<"\t";

cout<<endl;

}

return 0;

}*/

//Write a program which compares two integers and two floats and prints the greater number by function overloading

/*#include<iostream>

using namespace std;

void greatNumber(int,int);

void greatNumber(float,float);

int main()

{

int no1,no2;

float fno1,fno2;

cout<<"\nEnter The First Integer Number :-->";

cin>>no1;

cout<<"\n Enter The Second Integer Numner :-->";

cin>>no2;

cout<<"\nEnter The First Float Number :-->";

cin>>fno1;

cout<<"\n Enter The Second Float Number :-->";

cin>>fno2;

greatNumber(no1,no2);

greatNumber(fno1,fno2);

}

void greatNumber(int no1,int no2)

{

if(no1>no2)

cout<<"\n First Number Greater Than Second Number...!"<<no1<<">"<<no2;

else

cout<<"\n Second Number Greater Than First Number...!"<<no2<<">"<<no1;

}

void greatNumber(float fno1,float fno2)

{

if(fno1>fno2)

cout<<"\n First Number Greater Than Second Number...!"<<fno1<<">"<<fno2;

else

cout<<"\n Second Number Greater Than First Number...!"<<fno2<<">"<<fno1;

}*/

//. Write a program which calculates the area of square and rectangle by using same function name.

/*#include<iostream>

using namespace std;

float area(float);

float area(float,float);

int main()

{

float side_sqr,len_rect,wid_rect,area_s,area_r;

cout<<"\n Enter The Value Of Any Side Square:-->";

cin>>side_sqr;

cout<<"\n Enter The Length Of Rectangle:-->";

cin>>len_rect;

cout<<"\n Enter The Width Of Rectangle:-->";

cin>>wid_rect;

area_s=area(side_sqr);

cout<<"\n The Area Of Squre Is ...."<<area_s;

area_r=area(len_rect,wid_rect);

cout<<"\n The Area Of Rectangle Is...."<<area(len_rect,wid_rect);

return 0;

}

float area(float side_s)

{

return side_s*side_s;

}

float area(float len_r,float wid_r)

{

return len_r*wid_r;

}*/

Comments

Popular posts from this blog

4 Best Natural Skin Care Products

4. Khadi Natural Sandalwood And Kesar Moisturizer Buy Now On Amazon Gently apply on your body Can be used every day Suit On All Skin Type With Sandalwood Fragrance Sandalwood Moisturizer create a protective barrier for your skin with this Sandal, Kesar and Aloe vera moisturizer from Khadi. Perfectly designed for women, this Khadi Herbal Sandal, Kesar and Aloevera Moisturizer will leave your skin soft and supple. Aloe vera will leave a cooling effect on your skin and will nourish your skin. Also, vitamin E will add the accurate amount of moisture to your skin. 3. Himalaya Herbals Purifying Neem Face Wash Buy Now On Amazon Eliminates pimples Prevents recurrence of acne Cleanses face Combined with Turmeric Himalaya Purifying Neem Face Wash is a soap-free, herbal formulation that cleans impurities and helps clear pimples. Himalaya Purifying Neem Face Wash is 'soap-free', hence not harsh. It has the goodness of Neem and Turmeric th...

Which Sanitizers Are Best In India?

1.Lifebuoy Alcohol Based Germ Protection Hand Sanitizer Boosts Immunity for 10 hour Kills 99.99% germs without wate Kills 99.99% germs anytime, anywher Kills  germs instantly Boost the agents that give you hand immunity to keep fighting germs for upto 10 hours with Lifebuoy Immunity Boosting Sanitizer. It not only kills 99.99% germs instantly, but also boosts you immunity for upto 10 hours. And all this without having to use any water. This makes Lifebuoy Immunity Boosting Hand Sanitizer your defense against germs without having to make a trip to the wash basin. Just take a drop and apply on your palm. Spread and rub over back of your hands and fingertips until dry. Your hands are free from 99.99% germs instantly, without water. This premium in-home pack is quite looks great on your dining table and is an easy and convenient way to get 99.99% germ free hands. Just apply a drop, rub your hands and kill germs. Lifebuoy Hand Sanitizer is the most convenient and insta...

These Are The Top 10 Best Android Phone

These Are The Top 10 Best Android Phone   10.Samsung Galaxy S10 (White) Check Price On Amazon 8MP primary camera | 5MP front facing camera. 12.7 centimeters (5-inch) with 1280 x 720 pixels resolution. Memory, Storage & SIM: 3GB RAM | 8GB storage expandable up to 32GB | Dual nano SIM with dual standby (4G+4G). Android v5.1 Lollipop operating system with 1.3GHz 64-bit MT6735 P chipset quad core processor 3000mAH lithium-ion battery. 1 year manufacturer warranty for device and 6 months manufacturer warranty for in-box accessories including batteries from the date of purchase. Box also includes: Charger and User Manual. The result of 10 years of pioneering mobile firsts, Galaxy S10 series introduce the next generation of mobile innovation. Completely redesigned to remove interruptions from your view. No notch, no distractions. Precise laser cutting, on-screen security, and a Dynamic AMOLED that's easy on the eyes make the Infinity...

Best Mask For Save You From Coronavirus Bacteria | Coronavirus Mask

During Coronavirus Period In India Mask Wearing Is Compulsory Because Coronavirus B acteria   Go In Body Through Mouth.P eople Started Wearing Simple Cotton Mask.Cotton Mask Is Not Sufficient For Stop Go In Your Mouth Coronavirus Bacteria. In This Article I Suggest  Best Mask For Stop Corona Virus Bacteria Go In Your Mouth.    Surgical Mask :-    A surgery mask, furthermore knowing as a face mask, is purpose to be worn by health professionals during healthcare procedures. It is designed to prevent infections in patients and treating personnel by catching bacteria shed in liquid droplets and sprays from the wearer's mouth and nose. Wearing a surgical mask won't protect you much from contracting SARS-CoV-2. However it will help prevent you from spreading the virus to others.  N95 Mask :- N95  respirators can protect against smaller respiratory droplets such as those containin...
Home About Me Contact Us Disclaimer ©https://www.productadvisor.tech/ 2020 -2025