1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zmey [24]
2 years ago
8

Write a program that calculates the amount of money the salesperson will earn from selling discount cards. java program

Computers and Technology
1 answer:
BaLLatris [955]2 years ago
4 0

Answer:

import java.util.Scanner; public class Salesman2 {

public static void main(String[] args) { // TODO Auto-generated method stub double CommissionRate;

double TotalSales, Commission;

Scanner Read = new Scanner (System.in); System.out.println("Please enter total sales "); TotalSales=Read.nextDouble();

if (TotalSales<500)

CommissionRate=0.0;

else if (TotalSales>=500 && TotalSales <1000) CommissionRate=0.05;

else

CommissionRate=0.08;}

Commission = CommissionRate * TotalSales;

System.out.println("The Commision is: "+ Commission); }

}

}

You might be interested in
Sarah is starting her first job at the local ice cream shop. what can Sarah do to make a good impression on her first day of wor
nikdorinn [45]
Dress appropriate and have a good attitude
7 0
2 years ago
Read 2 more answers
Flesh out the body of the print_seconds function so that it prints the total amount of seconds given the hours, minutes, and sec
fiasKO [112]

Answer:

Step by step explanation along with code and output is provided below

Explanation:

#include<iostream>

using namespace std;

// print_seconds function that takes three input arguments hours, mints, and seconds. There are 60*60=3600 seconds in one hour and 60 seconds in a minute. Total seconds will be addition of these three  

void print_seconds(int hours, int mints, int seconds)

{

   int total_seconds= hours*3600 + mints*60 + seconds;

   cout<<"Total seconds are: "<<total_seconds<<endl;

}

// test code

// user inputs hours, minutes and seconds and can also leave any of them by  entering 0 that will not effect the program. Then function print_seconds is called to calculate and print the total seconds.

int main()

{

   int h,m,s;

   cout<<"enter hours if any or enter 0"<<endl;

   cin>>h;

   cout<<"enter mints if any or enter 0"<<endl;

   cin>>m;

   cout<<"enter seconds if any or enter 0"<<endl;

   cin>>s;

   print_seconds(h,m,s);

  return 0;

}

Output:

enter hours if any or enter 0

2

enter mints if any or enter 0

25

enter seconds if any or enter 0

10

Total seconds are: 8710

8 0
3 years ago
What can you look for on a website to indicate that the information it presents is reliable?
dybincka [34]

There are several things you can look for on a website to help you figure out if the information is reliable. The first thing you should evaluate is the audience that the website is intended for. Is it intended for academics? School children? The general public?


The next thing you should look at is the author of the website. Is the author identified? Is the author an expert in their field? Can you establish the author's credibility? Is the author affiliated to an academic institution or credible organisation?


Look at the accuracy of the website. Check for spelling errors, proper grammar, and well-written text. Are there any sources cited? Are those sources credible?


You should also check to see when the information was published. Is the information up to date? Are all of the links up to date and functioning?


There is one last thing you can look at, and this is the domain of the website. Domains like .edu and .gov are more credible than .com or .net domains.

5 0
3 years ago
If you were an architect planning on building a large scale Municipal complex what type of engineer would you identify as essent
Daniel [21]

Answer: civil engineer

Explanation:

Based on the information given, the type of engineer that would be identified as essential to the success of the project would be the civil engineer.

Civil engineers are the engineers that are in charge of the planning and overseeing building and infrastructure construction. They plan and monitor constructions involving bridges, road, houses, power plants etc.

3 0
2 years ago
When an object reflects all the light which falls on it it's color will be
lara31 [8.8K]
A- White. shows all wavelengths of light.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Plz answer and dont put a random thing for the points
    11·1 answer
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • Information systems security is the collection of activities that protect the information system and the data stored in it.
    12·1 answer
  • A junior administrator is having issues connecting to a router's console port using a TIA/EIA 568B standard cable and a USB seri
    5·1 answer
  • Pls help ...
    13·1 answer
  • MacBook Pro (2019) at 93% max capacity battery rating after 100 charge cycles. Is this normal? Used coconut battery to check thi
    10·2 answers
  • Use Spreadsheet Functions and Formulas
    6·1 answer
  • Write a function NumberOfPennies() that returns the total number of pennies given a number of dollars and (optionally) a number
    7·1 answer
  • PLEASE HELP. Nobody has been helping me, i need to resolve this code issue for game design
    8·1 answer
  • What is wrong with the following code?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!