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
tresset_1 [31]
2 years ago
7

Write a program using integers userNum and divNum as input, and output userNum divided by divNum three times.

Computers and Technology
1 answer:
riadik2000 [5.3K]2 years ago
7 0

Answer:

Follows are the code to this question:

#include <iostream>//header file

using namespace std;

int main() //defining main method

{

int userNum, divNum;//defining integer variable

cin>> userNum >> divNum;//input values

cout <<"First-time divide: "<<userNum / divNum<<endl;//divide value First time  

cout <<"Second-time divide: " << userNum / divNum/divNum<<endl; //divide value Second time

cout<<"Third-time divide: "<< userNum /divNum/divNum/divNum<<endl;//divide value Third time

return 0;

}

Output:

2000

2

First-time divide: 1000

Second-time divide: 500

Third-time divide: 250

Explanation:

In this code two integer variable "userNum and divNum" is declared that uses the input method to input value from the user-end, and after input the value it divides the "userNum by divNum" three times, that is defined as follows:

In this code, the user input the value 2000 and 2, in the first divides it will give 1000, in the second time divide it will give 500, and in the third time it will give 250.

You might be interested in
3 uses of a computer ​
GenaCL600 [577]

Answer:

online bills payment

watching movies or shows

home tutoring

3 0
2 years ago
Read 2 more answers
Alan is the security manager for a mid-sized business. The company has suffered several serious data losses when mobile devices
Kipish [7]

Disk encryption is highly risky response.

<u>Explanation:</u>

To protect or loss of serial data loss on mobile devices it is not advisable to implement full disk encrypted. Once full disk encrypted is implemented mobile access is very slow. End-user will complain to IT administrator.

Best solution either removes unwanted or unauthorized application from mobile to protect the data loss. Install antivirus program in each mobile.

Access or permission to application is removed so that mobile data loss can be avoided.  End user should also be advised not to click on any link which they receive through SMS messages or other through any applications.

5 0
3 years ago
Why would students most likely need to collect data? Check all that apply
n200080 [17]
Well I would think all of them in some way. For the first one, students need to collect data (whether it’s mathematical, scientific, etc.) to answer a question. For the second one, they may need to know how much money is in there bank account or they may need to calculate a sale to order the item. For the third one, they may need statistical data to support a position. For the last one, a student could use technological data to be able to solve their problem sorting documents.
5 0
3 years ago
Read 2 more answers
2. In many jurisdictions a small deposit is added to containers to encourage people to recycle them. In one particular jurisdict
RUDIKE [14]

Answer:

Here is the Python program:

small_container = int(input("Enter the number of small containers you recycled?"))

large_container = int(input("Enter the number of large containers you recycled?"))

refund = (small_container * 0.10) + (large_container * 0.25)

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund)))

Explanation:

The program first prompts the user to enter the number of small containers. The input value is stored in an integer type variable small_container. The input is basically an integer value.

The program then prompts the user to enter the number of large containers. The input value is stored in an integer type variable large_container. The input is basically an integer value.

refund = (small_container * 0.10) + (large_container * 0.25)  This statement computers the refund that will be recieved for returning the small and larger containers. The small containers holding one litre or less have a $0.10 deposit so the number of small containers is multiplied by 0.10. The large containers holding more than one litre have a $0.25 deposit so the number of large containers is multiplied by 0.25. Now both of these calculated deposits of containers of each side are added to return the refund that will be received for returning these containers. This whole computation is stored in refund variable.

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund))) This print statement displays the refund in the format given in the question. The output includes a $ sign and displays exactly two decimal places by using {0:.2f} where .2f means 2 decimal places after the decimal point. Then the output is represented in floating point number using. format(float) is used to specify the output type as float to display a floating point refund value up to 2 decimal places.

5 0
3 years ago
Which tool lists active tcp connections?
dimaraw [331]
Netstat
Type netstat -a to get a complete overview.
8 0
3 years ago
Other questions:
  • How to access files on different computer same network
    14·1 answer
  • When he takes a picture, Simon freezes an action without blurring it, to show movement. Which type of photographer is he?
    9·2 answers
  • "What is the database in which Windows stores all information about hardware, applications, users and system settings?"
    8·1 answer
  • Which one is not an operating system?1.mac 2.Microsoft office3.Iso.3.Android
    11·1 answer
  • How do you compare text on different pages of a document?
    14·1 answer
  • Which rotation speed is not a typical spindle rotation speed for magnetic hard drives?3100; 5400; 7200; 10000
    8·1 answer
  • What best describes "broadband access"?
    13·1 answer
  • What are the main features cyber law of Nepal​
    13·1 answer
  • What is the best way of farming exotics in destiny?
    12·2 answers
  • A simple C program to find the logarithm of any number in any base.....​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!