answer.
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
stepan [7]
2 years ago
3

Write an application that prompts a user for the number of years the user has until retirement and then the amount of money the

user can save annually. If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Assume that no interest is earned on the money. Display the amount of money the user will have at retirement.
Computers and Technology
1 answer:
Anastaziya [24]2 years ago
7 0

// variables to save fields given by the user

int years_left =0;

int amount=0;

int flag =0; // to check if both fields are valid

// while loop

while ( years_left >0 && amount >0){

// taking years left as input

cout<<" Enter the years left for your retirement: ";

cin>>years_left;

// if valid add in flag variable

if(years_left>0){

flag +=1;

}

// input amount saved annually

cout<<" Enter the amount of money saved annually : ";

cin>> amount;

// if valid flag ++

if(amount>0)

flag+=1;

// if both fields are vaild, out put them

if(flag==2)

{

cout<<" Years left are : " << years_left<< endl;

cout<<" Amount saved annually : " << amount <<endl;

}

flag = 0;

}

You might be interested in
A laptop gets replaced if there's a hardware issue. Which stage of the hardware lifecycle does this scenario belong to?
Ilya [14]

Answer: Maintenance. This is the stage where software is updated and hardware issues are fixed if and when they occur. Retirement. In this final stage, hardware becomes unusable or no longer needed and it needs to be properly removed from the fleet

Explanation:

3 0
2 years ago
You’re trying to cast a video presentation from your tablet to a projector for a training session with some new hires. Although
Vikki [24]

Answer:

Troubleshooting steps to take:

  1. Restart the tablet
  2. Restart the projector

Explanation:

When such problems occur, the basic and quick troubleshooting step is to restart the device or devices involved.

  1. Restart the tablet: This could come in handy regarding this problem. The inability to connect to the projector could be due to the inability of a specific service or driver needed for the projector. Restarting the tablet will load up the drivers and services again to enable smooth connections. When a restart is done, bugs are fixed, internet connection is rectified, memory leaks are stopped, performance is aided, the RAM (Random Access Memory) is flushed or cleaned. This should resolve the problem, however, if not, try number 2.
  2. Restart the projector: There are driver software on projectors, and due to one system failure or another, these software may fail to load. This could affect its connection to another device. As done in (1), restarting the projector will fix those bugs and load up, which should solve the connection issue.
7 0
2 years ago
Your friends credit scores are 560, 675, 710, 590, and 640. Your credit score is 680. What is the difference between the average
Wittaler [7]

Answer:

560+675+710+590+640=3175/5=635

so your credit score is 45 credits better than the average of your friends

Explanation:

3 0
2 years ago
Consider the eight bit signed binary number 1110 0101. Convert it to signed decimal from assuming the signed binary number is re
lapo4ka [179]

Answer:

-26

Explanation:

The given binary number is 1110 0101. Also given that the signed binary number is represented using one's compliment.

We begin by computing the 1s complement representation of 1110 0101 by inverting the bits: 00011010

Converting 00011010 to decimal, it corresponds to 26.

So the 1s complement of the original number is 26. This means that the original number was -26.

7 0
2 years ago
You learn that in a previous security breach at GearUp, a disgruntled employee destroyed the encryption key that had been used t
lukranit [14]

Answer:

The data can be safeguarded using key escrow procedure.

Explanation:

Key escrow basically means to store the cryptographic key in an "escrow" by a reputable trusted third party. The copy of the encryption key is kept with the third party. In case the cryptographic key gets lost or destroyed, then the key escrow service helps to access the encrypted data. It also manages the access control to the key in case the key gets lost. So this way in case of security breach at GearOn the key escrow service can be used to re-implement or access the key easily.

6 0
2 years ago
Other questions:
  • What are the two most important network-layer functions in a datagram network? what are the three most important network-layer f
    7·1 answer
  • Reading is the process of transferring data, instructions, and information from memory to a storage medium.
    15·1 answer
  • Suppose you define a java class as follows: public class test { } in order to compile this program, the source code should be st
    14·1 answer
  • Which is the term for a computer typically located in an area with limited security and loaded with software and data files that
    9·1 answer
  • True or False: A class that implements an interface may only implement a few of that interface's method declarations
    13·1 answer
  • He volume of a sphere is 4/3πr3, where π has the value of "pi" given in Section 2.1 of your textbook. Write a function called pr
    5·1 answer
  • LensForAll is a company that sells affordable contact lenses on its website. The CEO of the company realizes that an app must be
    9·1 answer
  • Assume each student is assigned an advisor from a department. Each classroom is assigned a classroom (class# determines Classroo
    14·1 answer
  • A data scientist is writing a Machine Learning (ML) algorithm using a large data set.
    12·1 answer
  • Plz help code practice for python
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!