Answer:
The program in C++ is as follows:
#include <iostream>
using namespace std;
int main(){
int qty;
float discount = 0;
cout<<"Quantity: ";
cin>>qty;
int cost = qty * 100;
{
; }
cout<<"Cost: "<<cost - discount;
return 0;
}
Explanation:
This declares the quantity as integer
int qty;
This declares and initializes discount to 0
float discount = 0;
This prompts the user for quantity
cout<<"Quantity: ";
This gets input for quantity
cin>>qty;
This calculates the cost
int cost = qty * 100;
If cost is above 1000, a discount of 10% is calculated
{
; }
This prints the cost
cout<<"Cost: "<<cost - discount;
Abraham Lincoln was known as the Great Emancipator because of his actions both during and after the Civil War. Lincoln was opposed to slavery and wanted it abolished. However, many historians contend that, because he did not action his opposition to slavery, he does not deserve the title of the Great Emancipator. He was afraid of losing political support from the Southern States. He is main focus was on keeping the Union together. On the other hand, most of the historians believe that the title of the Great Emancipator is an apt title.
Answer:
We use the Python language to implement the code, if you have and IDE, simply copy and paste the code and run it
Note: the cost function is c=(R+ .08*d)+5
Explanation:
#initialize some variables
T = 0.08 # tax for each day
F = 5.00 # one time fee
R = 100 # room rate
d = int(input("Enter the number of days stayed at the hotel "))
c = 0 # initialize cost variable
if (d > 0):
c=(R+ .08*d)+5
print(" the cost for ", d, " days is ", c )
else:
print(" Invalid entry for days ", d )
Answer:
In Windows 10 press the start button.
Then type <em><u>'Microsoft Word'.</u></em>
Next you will see an <u><em>Open</em></u> option, press that.
Now your <em><u>'Microsoft Word'</u></em> is ready.
Explanation: