Date Format - 2
Given seconds as input, write a program to print in D days H hours M minutes S seconds.
Input
The input will be a single line containing an integer.
Output
The output should be a single line containing the D Days H Hours M Minutes S Seconds format. Print only the non-zero values.
Explanation
For example, if the given seconds are 200. As 200 seconds is equal to 3 minutes and 20 seconds, and days, hours are zero, so ignore the days and hours. So the output should be "3 Minutes 20 Seconds"
Sample Input 1
200
Sample Output 1
3 Minutes 20 Seconds
Sample Input 2
86400
Sample Output 2
1 Days Right Angle Triangle
Given an integer N, write a program to print a right angle triangle pattern similar to the pattern shown below
/|
/ |
/ |
/ |
/____|
Input
The input will be a single line containing a positive integer (N).
Output
The output should be N lines containing the triangle pattern.
Explanation
For example, if the given number is 5, the pattern should be printed in 5 lines, as shown below
/|
/ |
/ |
/ |
/____|
Sample Input 1
5
Sample Output 1
/|
/ |
/ |
/ |
/____|
Sample Input 2
4
Sample Output 2
/|
/ |
/ |
/___|Create a class Armstrong and include startnumber and endnumber as data member and aslo include member function findArmstrongNumbers() to find all the Armstrong numbers between startnumber and endnumber. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
The class employee comprises of employee details such as emp_id(integer type), employee name(character array type) ,basic salary(float type), allowance(float type) and PF(float type). Get three employee details using getemployee() method and use display() method to calculate and display the net salary(basic salary+allowance+PF) of employees.
Note:Use the concept of class and objects.
A launchpad hosts multiple launches over time, and each launch is hosted by exactly one launchpad. Each launchpad has a location. A launch requires a launchpad that hosts it, a launch vehicle, and the payload. For a launch and name should be recorded as well as whether it is a crewed launch or not. Each launch is performed by a launch vehicle. The serial number for the launch vehicle should be recorded. A launch vehicle can perform multiple launches over time. Each launch vehicle is of a specific launch vehicle type. The maximum thrust and whether it is reusable needs to be recorded for the launch vehicle type. Each launch vehicle type and payload is made by a specific manufacturer and a manufacturer can make many different launch vehicle types. Each launch carries one payload, and a payload is only carried by one launch. Multiple crew members can be carried on a crewed launch, and each crew member can be carried on multiple launches over time. Each crew member has a nationality needs to be recorded. Draw an ERD
Create a class called employee with the following details as variables within it.
1. Name of the employee
2. Age
3. Designation
4. Salary
Get the details of 5 employees and initialize it using Constructor. Release resources using destructor. print the name, designation and salary of employees, Find the highest salaried employee in professor grade and display their details.
Create a class Armstrong and include startnumber and endnumber as data member and aslo include member function findArmstrongNumbers() to find all the Armstrong numbers between startnumber and endnumber. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
Imagine a tollbooth at a bridge. Cars passing by the booth are expected to pay a 50 cent toll. Mostly they do, but sometimes a car goes by without paying. The tollbooth keeps track of the number of cars that have gone by, and of the total amount of money collected. Model this tollbooth with a class called tollBooth. The two data items are a type unsigned int to hold the total number of cars, and a type double to hold the total amount of money collected. A constructor initializes both of these to 0. A member function called payingCar() increments the car total and adds 0.50 to the cash total. Another function, called nopayCar(), increments the car total but adds nothing to the cash total. Finally, a member function called display() displays the two totals. Make appropriate member functions const.
Four workers were responsible to pluck oranges. The owner of the orange farm will be given 40% of the oranges. The workers share equally the balance of the oranges. The balance of oranges after divided will be used to make juice. You are also required to calculate and print amount of oranges that were received by the owner, each of the workers and balance of oranges to make juice. Write a program.
Sample output:
Enter number of oranges plucked : 100
Total oranges for the owner is 40
Total oranges for each worker is 15
Balance of oranges to make juice is 0
***********another output sample**************
Enter number of oranges plucked : 125 Total oranges for the owner is 50 Total oranges for each worker is 18 Balance of oranges to make juice is 3
The function procedures are by default