Professional Documents
Culture Documents
Assignment
Assignment
#include <iostream>
int main()
system("color F0");
if (num1 == num2)
else
else
cout << "Line-2: Num1 is not less than num2" << endl;
return 0;
}
Lab-4
Practice Task 1:
#include<iostream>
int main()
int option;
if (option == 1)
int age;
cout << "\nThe retired employee age is: " << age << endl;
cout << "The pension of the employee is: 30000" << endl;
cout << "\nThe retired employee age is: " << age << endl;
cout << "The pension of the employee is: 40000" << endl;
Lab-4
else
cout << "\nThe age you have entered is not valid for a retired employee, it's too low" <<
endl;
else if (option == 2)
cout << "\nEnter the number of hours worked per day: ";
int hours;
int pay;
int extra_pay = 0;
if (hours == 8)
pay = 1000;
pay = 1000;
extra_pay = 3 * 300;
else {
pay = 1000;
cout << "\nThe number of hours worked by the employee is: " << hours << endl;
cout << "The total pay for the employee is: " << total_pay;
else
return 0;
Practice Task2:
#include<iostream>
int main()
int marks;
Lab-4
else
return 0;