A New Telephone Company has the following rate structure for long distance calls:
● The regular rate for a call is $0.10 per minute. (10 marks)
● Any call started at or after 6:00P.M. (1800 hours) but before 8:00A.M. (0800 hours) is
discounted 50 percent.
● Any call longer than 60 minutes receives a 15 percent discount on its cost (after any other
discount is subtracted).
● All calls are subject to a 4 percent federal tax on their final cost.
without using loops or functions
Create and test an HTML document that has at least a half-page of
text and a small box of text embedded on the left margin, with the main
text flowing around the small box. The embedded text must appear in a
smaller font and also must be set in italic.
students in the BIT level 300 class obtained various grades in a mid semester exam. a computer program is needed to find the highest and lowest class score
Create an algorithm for the computer program needed to solve the above program
The following algorithm is designed to print the beginning of what is known as the
Fibonacci sequence. Identify the body of the loop. Where is the initialization step for the
loop control? The modification step? The test step? What list of numbers is produced?
Last ← 0;
Current ← 1;
while (Current < 100) do
(print the value assigned to Current;
Temp ← Last;
Last ← Current; and
Current ← Last + Temp)
Describe a tree structure that can be used to store the genealogical history of a family. What operations are performed on the tree? If the tree is implemented as a linked structure, what pointers should be associated with each node? Design procedures to perform the operations you identified above, assuming that the tree is implemented as a linked structure with the pointers you just described. Using your storage system, explain how one could find all the siblings of a person.
The following program segment is an attempt to compute the quotient (forgetting any remainder) of two positive integers (a dividend and a divisor) by counting the number of times the divisor can be subtracted from the dividend before what is left becomes less than the divisor. For instance, 7⁄3 should produce 2 because 3 can be subtracted from 7 twice. Is the program correct? Justify your answer.
Count ← 0;
Remainder ← Dividend;
repeat (Remainder ← Remainder – Divisor;
Count ← Count + 1)
until (Remainder < Divisor)
Quotient ← Count.
In this task, you are being asked to write a loop in Java.
Write a program that uses while loops to perform the following steps:
a) Prompt the user to input two integers: startingNum and endingNum (startingNum must be
less than endingNum).
b) Output all even numbers between startingNum and endingNum.
c) Output the sum of all even numbers between startingNum and endingNum.
d) Output the numbers and their squares between startingNum and endingNum.
e) Output the sum of the square of the odd numbers between startingNum and endingNum.
1. Create a program called WhileLoops.java. All loops will be written in this file.
2. Create appropriate variables and assign values using a Scanner object.
3. Correctly display appropriate messages.
Write a program which takes a 9-digit number input from user, converts it into its reverse
No loops you can use only conditional structures.
Write a program which takes a number n as input and prints YAYY if the sum of all digits except the rightmost digit is equal to the rightmost digit., otherwise print OOPS. For example: If user enters 2237, it will print YAYY because 2+2+3 is equal to 7. Whereas, if user enters 3425, it will print OOPS because 3+4+2 is not equal to 5.
you can only use conditional structures . NO loops.
Paula and Danny want to plant evergreen trees along the back side of their yard. They do not want to have an excessive number of trees.
Write a program that prompts the user to input the following:
The program outputs:
Format your output with setprecision(2) to ensure the proper number of decimals for testing!