You are on page 1of 11

#include<iostream>

#include <windows.h>
using namespace std;
int main()

string
address,baranggay,streetnumber,streetnam
e,city,postal,contact,email;
string
emname,elname,efname,gender,civilstatus,
month,day,year;
//case d

{
char again;

char manipulate = ' ';


char selectRec;
char selectMain;

//case a
string ename;
float hwork;
float tax = 0.12;
float sss = 0.104,sssdeduct;
float philhealth =
0.025,philhealthdeduct;

int sec;
int min;
int hour;
double farenheit;
double celcius;
double inch;

float grosspay;

double cm;

float deduction;

char selectUnitConv;

float totalsalary;

char selectPay;
char selectTimeConv;

//case b
string
sno,slastname,sfirstname,final,remarks;

int selectConv;
int secConv;

int prelim,midterm,finals;
float average,equivalent;

string username,result,password;
cout<<"Username: ";

//case c

cin>>username;

cout<<"Password: ";

Sleep(1000);

cin>>password;

system("cls");

if(username =="username" && password


== "password")
{

break;
}

system("cls");
cout<<"Success\n";

else
{

Sleep(1000);

cout<<"Error\n";

system("cls");

Sleep(500);

system("cls");

else

{
cout<<"Error\n";
Sleep(500);
system("cls");

}
}
char choice;
cout<<"[A]Payroll\n";

while(1==1)
{

cout<<"[B]Student Record\n";
cout<<"[C]Employee Record\n";

cout<<"Username: ";
cin>>username;
cout<<"Password: ";
cin>>password;
if(username =="username" && password
== "password")
{
system("cls");
cout<<"Success\n";

cout<<"[D]Conversion\n";
cout<<"[E]Exit\n";
cout<<"Enter your Choice: ";
cin>>choice;
switch(choice)
{
case 'a' :
{

cout<<"Do you want to try again??[y]/[n] :


system("cls");

";
cin>>again;

cout<<"Enter Employee Name: ";


cin>>ename;
cout<<"Enter your hour's Work: ";

system("cls");
if(again=='y')
{
return main();

cin>>hwork;
}
grosspay = hwork * 56;
sssdeduct = grosspay * sss;

if(again=='n')
{
system("exit");

philhealthdeduct = grosspay *
philhealth;
deduction = philhealthdeduct +
sssdeduct;

break;
}

totalsalary = grosspay - deduction;


system("cls");
cout<<"Welcome "<<ename<<endl;

cout<<"SSS tax is 10.4%\nSSS:


"<<sssdeduct<<endl;
cout<<"PhilHealth tax is
2.5%\nPhilHealth:
"<<philhealthdeduct<<endl;
cout<<"Gross pay:
"<<grosspay<<endl;
cout<<"Deduction:
"<<deduction<<endl;
cout<<"Salary: "<<totalsalary<<endl;

case 'b':
{
system("cls");

cout<<"Enter Student Number: ";


cin>>sno;
cout<<"Enter Student Last Name: ";
cin>>slastname;

cout<<"Enter Student First Name: ";

equivalent = 2.75;

cin>>sfirstname;

remarks ="PASSED";
}
if((average>=79)&&(average<=81))

cout<<"Enter Prelim Grade: ";

cin>>prelim;

equivalent = 2.50;

cout<<"Enter Midterm Grade: ";

remarks ="PASSED";

cin>>midterm;

cout<<"Enter Finals Grade: ";

if((average>=82)&&(average<=85))

cin>>finals;

{
equivalent = 2.25;

average = (prelim*0.30)+
(midterm*0.30)+(finals*0.40);

remarks ="PASSED";
}
if((average>=86)&&(average<=88))

if(average < 75)

equivalent = 2.0;
equivalent = 5.0;
remarks = "FAILED";

remarks ="PASSED";
}
if((average>=89)&&(average<=91))

if(average == 75)

equivalent = 1.75;
equivalent = 3.0;
remarks ="PASSED";

remarks ="PASSED";
}
if((average>=92)&&(average<=94))
{

if((average>=76)&&(average<=78))
{

equivalent =1.5;

remarks ="PASSED";
}
if((average>=96)&&(average<=95))

cout<<"Equivalent:
"<<equivalent<<endl;
cout<<"Remarks:
"<<remarks<<endl;

{
equivalent =1.25;
remarks ="PASSED";

cout<<"Do you want to try again??[y]/[n] :


";

cin>>again;
if((average>=97)&&(average<=100))
{

system("cls");
if(again=='y')

equivalent = 1.0;

remarks ="PASSED";
}

return main();
}
if(again=='n')
{
system("exit");

cout<<"StudentNumber\tLastname\tFirstna
me\tPrelim\tMidterm\tFinals"<<endl;
cout<<"\t"<<sno;

break;
}

cout<<"\t"<<slastname;
cout<<"\t"<<sfirstname;
cout<<"\t";
cout<<"\t"<<prelim;

cout<<"\t"<<midterm;

case 'c':

cout<<"\t"<<finals;
cout<<"\n";
cout<<"Average:
"<<average<<endl;

{
system("cls");
cout<<"Personal Information\n";
cout<<"Employee Last Name: ";

cin>>elname;

cin>>streetname;

cout<<"Employee First Name: ";

cout<<"Enter Baranggay: ";

cin>>efname;

cin>>baranggay;

cout<<"Employee Middle Name: ";

cout<<"City/Municipality: ";

cin>>emname;

cin>>city;

cout<<"Gender: ";

cout<<"Postal Code: ";

cin>>gender;

cin>>postal;

cout<<"Civil Status: ";

cout<<"Contact Number: ";

cin>>civilstatus;

cin>>contact;

cout<<"Date of Birth"<<endl;

cout<<"Email Address: ";

cout<<"Month: ";

cin>>email;

cin>>month;
cout<<"Day: ";

system("cls");

cin>>day;
cout<<"Year: ";

cout<<"Personal Information\n";

cin>>year;

cout<<"Surname: "<<elname<<endl;
cout<<"First Name: "<<efname<<endl;
cout<<"Middle Name:
"<<emname<<endl;

system("cls");
cout<<"Contact Details\n";
cout<<"Address (No Space
Allowed)\n(Capital Letter first in every
accepting information)\n";
cout<<"Enter House/Building/Street
Number: ";
cin>>streetnumber;
cout<<"Street Name: ";

cout<<"Gender: "<<gender<<endl;
cout<<"Civil Status: "<<civilstatus<<endl;
cout<<"Date of Birth: "<<month<<"
"<<day<<" "<<year;
cout<<"\n\n";

cout<<"Contact Details\n";

cout<<"Address: "<<streetnumber<<"
"<<streetname<<" "<<baranggay<<"
"<<city<<endl;
cout<<"Postal Code: "<<postal<<endl;

cout<<"\n \n \t \t \t CONVERTION
PROGRAM" <<endl;

cout<<"Contact Number:
"<<contact<<endl;

Sleep(1000);
system("cls");

cout<<"Email Address:
"<<email<<endl<<endl;

int choose1;
char choose;
cout<<"Do you want to try again??[y]/[n] :
";
cin>>again;

cout << "---CONVERTION


PROGRAM---";

system("cls");
if(again=='y')

cout << "\n[1] inches to feet " <<


endl;
cout << "[2] fahrenheight to celcius"

<< endl;
return main();

cout << "[3] degree to celcius" <<


endl;

if(again=='n')

cout << "[4] exit" << endl;

cout << "\nchoose : ";


system("exit");

cin >> choose1;

break;
}

switch(choose1) { //SWITCH IN
CASE 'D'

case 1:
}
case 'd':

// CASE '1' HEIGHT

system("cls");
int inch;
int heightInches;

int feet, inches;

case 2: {
// CASE '2'
FAHRENHEIGHT DEGREE

char choose;

cout << "\n\n\t\tEnter height in


Inches : ";
cin >> heightInches;

float f,c;
char choose;

inches = heightInches %12; //


REMAINDER
feet = heightInches/12; //
INPUT DIVIDED BY 2
cout << "\n\n\n\t\t";
NEXTLINE TO THE RIGHT

system("cls");

//

cout << "enter the Fahrenheit


degree to find temperature in celcius : ";
cin >> f;

c = (f-32)/1.8; {
THE PROGRAM

//COMPUTATING

cout << "\n\t\tThe height in feet is "


<< feet << "\'" << inches << "\" " << endl;
cout << "\n";

cout<<"\ntry again? y/n ? : ";


cin>>choose;

if (choose == 'y') { system("CLS");


return main(); }
else { cout << "exit" << endl; }

cout<<"\nCELSIUS DEGREE =
"<<c<<endl;}

cout<<"\ntry again? y/n ? : ";


cin>>choose;

if (choose == 'y') { system("CLS");


return main(); }
else { cout << "\nexit" << endl; }

}// END OF CASE '2'


} // END OF CASE '1'

break; //STOP CASE 2

break; // STOP CASE 1


case 3: { // CASE '3' DEGREE TO
CELCIUS

system("cls");
float degree,c;

cout << "wrong answer.. exit


program .." << endl;

char choose;
cout << "\ntry again? y/n ? : ";
cin >> choose;

cout << "Enter degree : ";


cin >> degree;

if (choose == 'y') { system("CLS");


return main(); }
c = (degree *3.1415926)/180;

cout << c << " celcius "<<endl;

else { cout << "\nexit" << endl; }

}//END OF DEFAULT SWITCH IN


CASE 'D'
break;

cout << "\ntry again? y/n ? : ";


cin >> choose;

} // END OF SWITCH IN CASE 'D'


break;

if (choose == 'y') { system("CLS");


return main(); }

else { cout << "\nexit" << endl; }


}
}

// END OF CASE '3'

case 'e':

break; //STOP CASE 3

{
system("cls");

case 4: { system("cls"); cout << "exit" <<


endl; }

cout<<"System will Terminate in


5\n";

break;

Sleep(1000);
system("cls");

default:{
char choose;

cout<<"System will Terminate in


4\n";

Sleep(1000);
system("cls");
cout<<"System will Terminate in
3\n";
Sleep(1000);
system("cls");
cout<<"System will Terminate in
2\n";
Sleep(1000);
system("cls");
cout<<"System will Terminate in
1\n";
Sleep(1000);
system("cls");
system("exit");
}
}

}
}

You might also like