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
slavikrds [6]
2 years ago
10

Write a program that allows the user to continuously input the value n until a negative number is entered

Computers and Technology
1 answer:
Paul [167]2 years ago
3 0

Answer:

Written in C++

Explanation:

#include <iostream>

using namespace std;

int main()

{

int n;

while(true)

{

cin>>n;

if(n>=0)

continue;

break;

}

return 0;

}

You might be interested in
Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
zepelin [54]

Answer:

Explanation:

The following is written in C++ and asks the user for inputs in both miles/gallon and dollars/gallon and then calculates the gas cost for the requested mileages using the input values

#include <iostream>

#include <iomanip>

using namespace std;

int main () {

   // distance in miles

   float distance1 = 20.0, distance2 = 75.0, distance3 = 500.0;

   float miles_gallon, dollars_gallon;

   cout << "Enter cars miles/gallon: "; cin >> miles_gallon;

   cout << "Enter cars dollars/gallon: "; cin >> dollars_gallon;

   cout << "the gas cost for " << distance1 << " miles is " << fixed << setprecision(2) << (float) dollars_gallon * distance1 / miles_gallon << "$\n";

   cout << "the gas cost for " << distance2 << " miles is " << fixed << setprecision(2) << (float) dollars_gallon * distance2 / miles_gallon << "$\n";

   cout << "the gas cost for " << distance3 << " miles is " << fixed << setprecision(2) << (float) dollars_gallon * distance3 / miles_gallon << "$\n";

   return 0;

}

8 0
3 years ago
This algorithm requires you to find the perimeter of 12 different squares.
k0ka [10]

Answer:

BEGIN

SET count = 1

WHILE count <= 12 THEN

     INPUT length

     perimeter = length * length

     PRINT perimeter

END WHILE

END

Explanation:

You can also set count to 0 and in while loop use count < 12 to loop just 12 times just as above

4 0
2 years ago
If you get a flat tire on the side of the road, what do you do.
umka21 [38]

Answer:

keep driving and prey that it doesn't melt the tape holding your gas tank up

4 0
3 years ago
Use the Web to search for different ways to share an Access database, such as the one for Colonial Adventure Tours, with others
stellarik [79]

Answer:

Check the explanation

Explanation:

There are certainly many ways through which we can access and share database. The different ways to share an access database are as follows:  

1. By using Sharepoint site: To utilize the SharePoint you should have windows SharePoint services server enabled on your system. Sharepoint assists in making database accessing very convenient by using methods like linking to list and publishing a database.  

2. By using database server: This technique split a database that the tables are stored on the network in which each user has a copy of an access database file. The database file comprises of tables which contain queries, reports, forms, and other database objects.  

3. By using split database: This technique is utilized when a database server product or a SharePoint site is unavailable. The tables then gains access into one access file and everything goes to other access files.  

4. Network Folder: In this technique database file is stored on a shared network device and users can use the file simultaneously.  

Below is the table for necessary hardware and software:

                                                   Sharepoint  database     split       Network

                                                         site          server    database    Folder

Need for database server software?No             Yes       No        No

Need for windows server?                Yes              No        No        No

6 0
3 years ago
A user has reported that the company notebook is performing some random mouse actions requiring the user to make a lot of typing
Anna35 [415]

Answer:

By using the function key to disable the mouse pad.

Explanation:

If the company notebook is performing mouse actions that are random causing the user to make a lot of typing corrections.The technician can solve this issue for the user by using the function key to disable the mouse pad.It can be done by pressing the fn(function key) + F7.This function key is only present on the notebook not on the PC keyboards.

8 0
3 years ago
Other questions:
  • write a program, using python, to determine the mean, median, and standard deviation of a list of numbers. In addition, count th
    7·1 answer
  • For Java, a program is converted from a text file of code into an executable file by the process of ?
    11·1 answer
  • Advantages of heading attributes
    5·1 answer
  • Does anyone know test 3 for edhesive computer science? (Not AP)
    7·1 answer
  • What does XD mean? I keep seeing people say it and I dont know what it means
    6·2 answers
  • Carlos had 194 seeds and 11 flower pots he put the same number of seeds in each flower pot which is the best estimate for the nu
    6·1 answer
  • susan wrote the recursive formula for the sequence represented by the exploit formula An=3+2n. put an C net to any correct state
    13·1 answer
  • Can you guys report my last question trying not to get caught for cheating all questions please
    8·1 answer
  • Which action does not happen in each iteration of the repeat loop in the
    9·1 answer
  • Write a single instruction that inverts bits 5 and 6 in the bl register
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!