Design an algorithm that converts a temperature value in Fahrenheit (F) to value in Celsius (C) using the following formula: C = (F -32) x (100/180)
design an algorithm that adds numbers from 1 to 100
Write a program that will store the student id number, average quiz score, midterm exam score, and final exam score maximum of 25 students(score must from 0 to) and Instead of forcing the user to enter all of the data at once and displaying all of it, the program will provide menu options that allows user to add new records, delete, update and view all records. It should also provide an option called settings that allows the user to set the grading criteria that will be used in the computation of grades. You may include an additional functionality that allows the user to search a specific record of a student given the student number. A sample menu driven application is given below
Mini Grading System
1. Add New Record
2. Edit Record
3. Delete Record
4. View All
5. Settings
6. Search
7. Exit
Enter your choice:
C++ (use two-dimensional array) A company has four salespeople (1-4) who sell five different products (1-5).each salesperson passes in a slip for each different type of product sold. Each slip contains the following:
a) salesperson number
b) product number
c) total dollar value of that product sold that day
Thus, each salesperson passes in between 0 and 5 sales slips per day. Assume the information from the slips for last month is available. Write a program that will read all information for last month’s sales (one salesperson’s data at a time) and summarize the total sales by salesperson by product. All totals should be stored in the two-dimensional array sales. After processing all the information for last month, print the results in tabular format with each of the columns representing a salesperson and each of the rows representing a product. Cross total each row to get the total sales of each product for last month; each column to get the total sales by salesperson for last month.
Ramsha’s basic salary is input through the kevboard. His medical allowance is 40% of basic salary And house rent allowance is 20% of basic salary, Write a program to calculate his gross salary:
Consider the table below and answer questions 23 to 25. The table depicts the running time (seconds) dependant on input size (n) of three algorithms Algorithm n = 100 n = 1000 n = 10 000 A 4 400 40 000 B 9 90 900 C 21 31 41 Question 23 What is the running time complexity of algorithm A? 1. O(n) 3. O(log n) 2. O(n2 ) 4. O(2n ) Question 24 What is the running time complexity of algorithm B? 1. O(n) 3. O(log n) 2. O(n2 ) 4. O(2n ) Question 25 What is the running time complexity of algorithm C? 1. O(1) 3. O(log n) 2. O(n) 4. O(1/n
write a program to calculate the cost of long distance call
• Any call made between 8:00 AM and 6:00 PM, Monday through Friday, is billed at rate of 6 rupees per min.
• Any call made before 8:00 AM or after 6:00 PM, Monday through Friday, is charged at rate of 3.75 rupees per min
• Any call made on a Saturday or Sunday is charged at a rate of 1.5 rupees per min.
The program will input the day of the week along with other inputs. The day of the week will be read as one of the following pairs of characters, which are stored in two variables char:
Mo,Tu,We,Th,Fr,Sa,Su.
If call is started on Friday at 11:55 PM and ends at 12:05 AM on Saturday then rate of call be calculated as cost of call as per schedule on Friday for first 5 min plus the cost of call as per schedule on Saturday for rest of the 5 min. Similarly, if call starts on Sunday at 11:55 PM and ends at 12:05 AM on next day i.e. Monday, then cost of the call be calculated as charges as per schedule on Sunday plus charges as per schedule on Monday.
You are required to write a C++ program to read in one customer’s account balance at the beginning of the month, a total of all withdrawals for the month, and a total of all deposits made during the month. A federal tax charge of 1% is applied to all transactions made during the month. The program is to calculate the account balance at the end of the month by
(1) subtracting the total withdrawals from the account balance at the beginning of the month, (2) adding the total deposits to this new balance,
(3) calculating the federal tax (1% of total transactions, i.e.total withdrawals + total deposits),
(4) subtracting this federal tax from the new balance.
After these calculations, print the final end-of-month balance.
Create an Inventory class that a warehouse might use to represent their stock of products and raw materials. Include a data member of type string to provide a description of the product, and data member of type int to represent the balance stock. Provide a constructor that receives an initial product and uses it to initialize the data members. The constructor should validate the initial product to ensure it has a stock greater than 20, which is the company’s minimum stock level. If not, it should display an error message. Provide three member functions. Member function Purchase should add a product to the current stock. Member function Sale should reduce stock. Ensure after each sale that the stock level does not drop below 20. Member function getStock should return the current stock. Create a program that creates two Inventory objects and tests the member functions of the class.
the program will provide menu options that allows user to add new records, delete, update and view all records. It should also provide an option called settings that allows the user to set the grading criteria that will be used in the computation of grades. You may include an additional functionality that allows the user to search a specific record of a student given the student number. A sample menu driven application is given below
Mini Grading System
1. Add New Record
2. Edit Record
3. Delete Record
4. View All
5. Settings
6. Search
7. Exit
Enter your choice: