Subscribe Our Channel

header ads

Search This Blog

Tuesday, October 17, 2023

Scientific Calculator Project using C++ Language , C++ Project to Scientific Calculator

Scientific Calculator Project using C++ Language | C++ Project to Scientific Calculator | Scientific Calculator Project with source code in C programming


HELLO VIEWERS YOU MIGHT BE INTERESTED IN THIS POST.

Your welcome to our website COMPUTER SOFT SKILLS, after reading this article you can make this project in just 2 minutes.

THIS IS C++ PROGRAMMING TO CREATE Scientific Calculator Project.
THIS IS A C++ PROJECT.

YOU CAN COPY THIS CODE AND SAVE IN YOUR SYSTEM.

SCIENTIFIC CALCULATOR IN C++ LANGUAGE



This Project Modified by Rohit, owner of Computer Soft Skills. Yes you read it right! You can make that type of Project easily in c++ application.


//____/____ WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS CHANNEL _____\______//


//--------- C++ PROJECT TO CREATE SCIENTIFIC CALCULATOR -------------\\

/*________________________________________________________________________*/


#include<iostream.h>

#include<stdio.h>

#include<conio.h>

#include<math.h>

#include<dos.h>

#include<graphics.h>

#include<stdlib.h>

#define PI 3.14


long int a,c,d,e[100],i,fact=1,t,sub,sum=0,x;

float root1,root2,b,f,g;

double h,j;

void main()

{

clrscr();

int gd=DETECT,gm;

initgraph(&gd,&gm,"C:\\TC\\BGI");


setcolor(11);

settextstyle(0,0,2);

outtextxy(50,10,"--- SCIENTIFIC CALCULATOR ---");


delay(800);

 do

 {

setcolor(14);

settextstyle(1,0,2);

outtextxy(50,35,"1. Arithmetic Operations");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,65,"2. Trignometric functions");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,95,"3. Lograthmic functions");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,125,"4. Power functions ");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,155,"5. Hyperbolic functions");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,185,"6. Factorial");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,215,"7. Roots of quadratic eqn. ");


setcolor(14);

settextstyle(1,0,2);

outtextxy(50,245,"8. Exit");


setcolor(15);

settextstyle(0,0,2);

outtextxy(0,275,"-----------------------------------------------");


cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"<<"ENTER YOUR CHOICE\t";

cin>>a;

switch(a)

{


case 1:

cout<<"\n"<<"\t"<<"1.Addition(+)";

cout<<"\n"<<"\t"<<"2.Subtraction(-)";

cout<<"\n"<<"\t"<<"3.Multiplication(*)";

cout<<"\n"<<"\t"<<"4.Division(/)";

cout<<"\n"<<"--------------------------------------------------------------------------------";

cin>>c;

if (c==1)

{

cout<<"\n"<<"How much no you want to print ";

cin>>a;


cout<<"\n"<<"Enter the no  ";

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

cin>>e[b];


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

{

sum=sum+e[b];

}

cout<<"\n"<<"Sum = "<<sum;

cout<<"\n"<<"-----------------------------------";


}


else if(c==2)

{


cout<<"\n"<<"Enter the 1st no ";

cin>>a;

cout<<"\n"<<"Enter the 2nd no ";

cin>>d;

sub=a-d;


cout<<"\n"<<"Sububtraction = "<<sub;

cout<<"\n"<<"----------------------------------";

break;

}

else if(c==3)

{

cout<<"\n"<<"Enter the first no. ";

cin>>a;

cout<<"\n"<<"Enter the second no. ";

cin>>c;

d=a*c;

cout<<"\n"<<"Answer = "<<d;

cout<<"\n"<<"--------------------------------------------";

break;

}

 else if(c==4)

 {

cout<<"\n"<<"Enter the no ...  like a/b";

cin>>b>>f;


g=b/f;

cout<<"\n"<<"Division = "<< g;

cout<<"\n"<<"-----------------------------------";

break;

}

else

{

cout<<"\n"<<"INVALID CHOICE";

}

break;

case 2: cout<<"\n"<<"1. sinx";

cout<<"\n"<<"2. cosx";

cout<<"\n"<<"3. tanx";

cout<<"\n"<<"-----------------------------------";

cout<<"\n"<<"Enter your choice ";

cin>>c;

if (c==1)

{

cout<<"\n"<<"Enter angle";

cin>>h;

j=sin(h*PI/180);

cout<<"\n"<<"sin"<<h<<" = "<<j;

cout<<"\n"<<"----------------------------------";

break;

}

else if (c==2)

{

cout<<"\n"<<"Enter angle ";

cin>>h;

j=cos(h*PI/180);

cout<<"\n"<<"cos"<<h<<" = "<<j;

cout<<"\n"<<"--------------------------------";

break;

}

else if (c==3)


{

cout<<"\n"<<"Enter angle ";

cin>>h;

j=tan(h*PI/180);

cout<<"\n"<<"tan"<<h<<" = "<<j;

cout<<"\n"<<"----------------------------------";

break;

}

else

{

cout<<"\n"<<"INVALID CHOICE ";

cout<<"\n"<<"----------------------------------";


}

break;

case 3: cout<<"\n"<<"1. log10 ";

cout<<"\n"<<"2. log ";

cout<<"\n"<<"Enter your choice ";

cin>>a;

if(a==1)

{

cout<<"\n"<<"Enter no.";

cin>>h;

f=log10(h);

cout<<"\n"<<"log10"<<h<<" = "<<f;

break;

}


else

 if (a==2)

{

cout<<"\n"<<" ln";

cout<<"\n"<<"Enter no. ";

cin>>f;

g=log(f);

cout<<"\n"<<"ln"<<f<<" = "<<g;

cout<<"\n"<<"----------------------------------";

}


break;

case 4:

cout<<"\n"<<"1. Square (x^2) ";

cout<<"\n"<<"2. Cube   (x^3) ";

cout<<"\n"<<"3. Square root ";

cout<<"\n"<<"4. Cube root ";

cout<<"\n"<<"5. Power ";

cout<<"\n"<<"--------------------------";

cout<<"\n"<<"Enter your choice ";

cin>>t;

if(t==1)

{

cout<<"\n"<<"Enter value ";

cin>>b;


c=b*b;

cout<<c;

cout<<"\n"<<"------------------------------";

 break;

 }

 else if(t==2)

 {


 cout<<"\n"<<"Enter value ";

cin>> b;


c=b*b*b;

cout<<c;

cout<<"\n"<<"-------------------------";

break;

}


else if(t==3)

{

cout<<"\n"<<"Enter  value ";

cin>>a;


b=sqrt(a);

cout<<b;

cout<<"\n"<<"---------------------------";

 break;

}

else if (t==4)

{

cout<<"\n"<<"Enter  no ";

cin>>h;

j=pow(h,(1.0/3.0));


cout<<"\n"<<j;

 break;

}


else if(t==5)

{

cout<<"\n"<<"Enter no ";

cin>>a;

cout<<"\n"<<"enter power ";

cin>>b;

d=pow(a,b);


cout<<"\n"<<d;

cout<<"\n"<<"--------------------------";


}

else

{

cout<<"\n"<<"INVALID CHOICE";

cout<<"\n"<<"----------------------------";


} break;

case 5:

cout<<"\n"<<"1. Sinhx ";

cout<<"\n"<<"2. Coshx ";

cout<<"\n"<<"3. Tanhx ";

cout<<"\n"<<"-----------------------------";

cout<<"\n"<<"Enter your choice ";

cin>>a;

if (a==1)

{

cout<<"\n"<<"Enter no ";

cin>>h;

h=log(2.0);

j=sinh(h);

cout<<"\n"<<j;

cout<<"\n"<<"-----------------------------";

break;

}

else if (a==2)

{

cout<<"\n"<<"Enter  no ";

cin>>h;

h=log(2.0);

j=cosh(h);

cout<<"\n"<<j;

cout<<"\n"<<"-------------------------";

break;

}

else if (a==3)

{

cout<<"\n"<<"Enter  no ";

cin>>h;

h=log(2.0);

j=tanh(h);

cout<<"\n"<<j;

cout<<"\n"<<"----------------------------";

break;

}

else

{

cout<<"\n"<<"INVALID CHOICE";

}

break;

case 6:

{

cout<<"\n"<<"Enter no ";

cin>>a;


for(i=a;i>=1;i--)

fact=fact*i;

cout<<"\n"<<a<<"!"<<" = "<<fact;

cout<<"\n"<<"---------------------------";


}

break;

case 7:

{

cout<<"\n"<<"Enter the value of a , b , c of eqn. ax^2+bx+c ";

cin>>a>>b>>c;


d=b*b-4*a*c;

if (d>0)

{

root1=(-b+sqrt(d))/(2*a);

root2= (-b-sqrt(d))/(2*a);

cout<<"\n"<<"roots are real or unequal";

cout<<"\n"<<"root 1 = "<<root1;

cout<<"\n"<<"root 2 = "<<root2;


}

else if (d==0)

{

root1=-b/(2*a);

cout<<"\n"<<"roots are real and equal";

cout<<"\n"<<"root 1 = "<<root1;

cout<<"\n"<<"root 2 = "<<root1;


}

else

cout<<"\n"<<"roots are complex and imaginary";

cout<<"\n"<<"---------------------------------";


} break;

case 8:

{

exit(0);

}

break;

default:

cout<<"\n"<<"invalid choice";

}

cout<<"\n"<<"Press any to continue...";

cin>>x;

}

while(x!='0');


getch();

}


/*---------------- I HOPE YOU LIKE THIS C++ PROJECT ---------------------*/


/*____________ LIKE __________ SHARE _________ SUBSCRIBE _________________*/



If you like that Programming article then share it with your friends, Thanks.

Tour and Travel Project using C++ Language, C++ Project Tour and Travel

Tour and Travel Project using C++ Language | C++ Project to Tour and Travel | Tour & Travels Project with source code in C programming


HELLO VIEWERS YOU MIGHT BE INTERESTED IN THIS POST.

Your welcome to our website COMPUTER SOFT SKILLS, after reading this article you can make this project in just 2 minutes.

THIS IS C++ PROGRAMMING TO CREATE Tour and Travel Project.
THIS IS A C++ PROJECT.

YOU CAN COPY THIS CODE AND SAVE IN YOUR SYSTEM.

TOUR AND TRAVELS PROJECT IN C++



This Project Modified by Rohit, owner of Computer Soft Skills. Yes you read it right! You can make that type of Project easily in c++ application.


//____/____ WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS CHANNEL _____\______//

//--------- C++ PROJECT TO CREATE TOUR & TRAVELS PROJECT -------------\\
/*________________________________________________________________________*/


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
void cname();
void logo();
void about();
void tag();
void facility();
void information();
void details_fill();
void payment();
void details_check();
void main()
{
int gd=DETECT,gm,i;
initgraph(&gd,&gm,"C:\\TC\\BGI");
cname();
logo();
getch();
cleardevice();
cname();
about();
getch();
cleardevice();
cname();
tag();
facility();
getch();
cleardevice();
information();
getch();
}
void cname()
{
setcolor(11);
rectangle(150,30,450,100);
rectangle(30,100,620,180);

setcolor(15);
settextstyle(1,0,4);
outtextxy(200,50,"TREASURES");
outtextxy(160,120,"TOUR & TRAVELS");
settextstyle(0,0,2);
setcolor(14);
outtextxy(120,200,"JOBS FILL YOUR POCKET,");
outtextxy(70,230,"BUT ADVENTURES FILL YOUR SOUL.");
}
void logo()
{
// CAR BODY
setcolor(2);
line(50,370,90,370);
arc(110,370,0,180,20);
line(130,370,220,370);
arc(240,370,0,180,20);
line(260,370,300,370);
line(300,370,300,350);
line(300,350,240,330);
line(240,330,200,300);
line(200,300,110,300);
line(110,300,80,330);
line(80,330,50,340);
line(50,340,50,370);

// CAR Windows
setcolor(12);
line(165,305,165,330);
line(165,330,230,330);
line(230,330,195,305);
line(195,305,165,305);

line(160,305,160,330);
line(160,330,95,330);
line(95,330,120,305);
line(120,305,160,305);

// CAR Wheels
setcolor(1);
circle(110,370,17);
circle(240,370,17);

//ROAD
setcolor(13);
line(0,400,639,400);


//bus
setcolor(11);
line(330,270,590,270);
line(330,270,330,380);
line(590,270,590,380);
line(330,380,355,380);
line(405,380,515,380);
line(565,380,590,380);
rectangle(350,280,390,320);
rectangle(410,280,450,320);
rectangle(470,280,510,320);
rectangle(530,280,570,320);
circle(380,380,20);
circle(540,380,20);

setcolor(14);
settextstyle(0,EMPTY_FILL,1);
outtextxy(10,440,"Enter to continue...");
}
void about()
{
setcolor(10);
settextstyle(0,0,1);
outtextxy(10,300,"Contact:");
line(10,310,70,310);
outtextxy(10,330,"Computer Soft Skills");
outtextxy(10,350,"OUR WEBSITE ");
outtextxy(10,370,"TECHTOINFO24.BLOGSPOT.COM ");
outtextxy(10,390,"ROHITTECHSTUDY.BLOGSPOT.COM");
outtextxy(10,410,"VISIT OUR WEBSITE");

//BRANCES
outtextxy(450,300,"Branches:");
line(450,310,520,310);
outtextxy(450,330,"Rewari:  XXXXXXXXXX");
outtextxy(450,350,"Gurgaon:  XXXXXXXXXX");
outtextxy(450,370,"Delhi:  XXXXXXXXXX");
outtextxy(450,390,"Jaipur:  XXXXXXXXXX");
outtextxy(450,410,"Mathura:  XXXXXXXXXX");
setcolor(11);
outtextxy(10,440,"Enter to continue...");
}
void tag()
{
setcolor(9);
settextstyle(0,0,1);
outtextxy(20,270,"India's Leading Travel Brand     Best Price Guaranteed.");
}
void facility()
{
settextstyle(0,0,2);
setcolor(5);
outtextxy(200,300,"OUR FACITIES");
settextstyle(0,0,1);
setcolor(5);
outtextxy(120,350,"Vichels");
line(120,360,175,360);
setcolor(10);
outtextxy(50,370,"Scorpio");
outtextxy(50,390,"Qualis");
outtextxy(50,410,"Bolero");
outtextxy(50,430,"Traveller");
outtextxy(50,450,"Verna");
outtextxy(50,470,"Volvo bus");
outtextxy(170,370,"Wagonr");
outtextxy(170,390,"Tata Sumo");
outtextxy(170,410,"Tavera");
outtextxy(170,430,"Innova");
outtextxy(170,450,"Ertiga");
outtextxy(170,470,"Eeco");
setcolor(5);
outtextxy(370,350,"Cities");
line(370,360,415,360);
setcolor(10);
outtextxy(320,370,"Goa");
outtextxy(320,390,"Mumbai");
outtextxy(320,410,"Delhi");
outtextxy(320,430,"Haridwar");
outtextxy(320,450,"Shimla");
outtextxy(320,470,"Manali");
outtextxy(440,370,"Jammu & Kashmir");
outtextxy(440,390,"Kerala");
outtextxy(440,410,"Gujrat");
outtextxy(440,430,"Dehradun");
outtextxy(440,450,"Shirdi");
outtextxy(440,470,"Jaipur");
}
void information()
{
int i;
char b;
do
{
printf("\n 1. Enter details...");
printf("\n 2. Check details...");
printf("\n 3. Payment...");
printf("\n Enter your choice...");
scanf("\n%d",&i);
switch(i)
{
case 1:
details_fill();
printf("\n=======================================");
break;
case 2:
details_check();
printf("\n==============================================");
break;
case 3:
payment();
printf("\n==========================================");
break;
default:
printf("\n Invalid choice... ");
printf("\n==============================================");
}
printf("\n Enter 'y' OR 'Y' to continue...");
scanf("\n%s",&b);
}
while(b=='y'||b=='Y');
}
void details_fill()
{
FILE *fptr;
char name[20];
int age;
float salary;
char vichel[20];
char city[20];
int members;
fptr = fopen("treasures.txt", "w");
if (fptr == NULL)
{
printf("\nFile does not exists \n");
}
printf("Enter the name \n");
scanf("\n%s", name);
fprintf(fptr,"Name      = %s\n",name);
printf("Enter the age\n");
scanf("\n%d", &age);
fprintf(fptr,"Age       = %d\n",age);
printf("Enter the vichel \n");
scanf("\n%s", vichel);
fprintf(fptr,"Vichel    = %s\n",vichel);
printf("Enter the city \n");
scanf("\n%s", city);
fprintf(fptr,"City      = %s\n", city);
printf("Enter the no. of members\n");
scanf("\n%d", &members);
fprintf(fptr,"Members   = %d\n",members);
printf("\n Your details are successfully registered \n");
fclose(fptr);
}
void details_check()
{
FILE *fptr;
char filename[15];
char ch;
printf("\nEnter the filename to be open...");
scanf("\n%s", filename);
fptr = fopen(filename, "r");
if (fptr == NULL)
{
printf("Cannot open file \n");
}
ch = fgetc(fptr);
while (ch != EOF)
{
printf ("%c", ch);
ch = fgetc(fptr);
}
fclose(fptr);
}
void payment()
{
FILE *fptr;
char name[20];
long int  cardno;
int cvv;
int pin;
clrscr();
fptr = fopen("hello.txt", "w");
if (fptr == NULL)
{
printf("File does not exists \n");

}
printf("Enter the name \n");
scanf("\n%s", name);
fprintf(fptr,"Name  = %s\n", name);
printf("Enter the cardno\n");
scanf("\n%ld", &cardno);
fprintf(fptr,"Your card no:  = %ld\n", cardno);
printf("Enter the cvv \n");
scanf("\n%d", &cvv);
fprintf(fptr,"Your cvv is:  = %d\n", cvv);
printf("Enter the pin\n");
scanf("\n%d", pin);
fprintf(fptr,"Your pin is:  = %d\n", pin);
printf("\n Your transaction is being proceed");
delay(10);
printf("\t.");
delay(10);
printf("\t.");
delay(10);
printf("\t.");
delay(10);
printf("\n\n transaction completed");
delay(10);
printf("\n\n NOTE : your details are keep in private");
fclose(fptr);
}



/*---------------- I HOPE YOU LIKE THIS C++ PROJECT ---------------------*/

/*____________ LIKE __________ SHARE _________ SUBSCRIBE _________________*/

If you like that Programming article then share it with your friends, Thanks.


Featured Post

Happy Republic Day Wish Using HTML and CSS | 26 January wish using HTML/CSS

 Happy Republic Day Wish Using HTML and CSS, 26 January wish using HTML/CSS <!-- WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS CHANNEL -----...

Popular Posts