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
ArbitrLikvidat [17]
3 years ago
12

(TCO 4) What will be the value of input_value if the value 5 is input at run time? cin >> input_value; if (input_value &gt

; 5) input_value = input_value + 5; else if (input_value > 2) input_value = input_value + 10; else input_value = input_value + 15;
Computers and Technology
1 answer:
ICE Princess25 [194]3 years ago
6 0

Answer:

15

Explanation:

if ..else is the conditional statement which is used to check the condition is true or not, if the condition is true that execute the particular statement and if not it moves to else part for execution.

if condition is more than two we can use continuous if else statement

Syntax:

if(condition)

{

 statement;

}else if(condition)

{

  statement;

}else

{

 statement;

}

In the code:

The value of the input is 5.

first it goes to if part and check condition if 5 > 5, condition false it equal to 5 not greater than 5.

it then moves to else if part and check condition if 5 > 2, condition is true,

it execute the code inside the else if part. so, input_value become

5+10 which 15.

after that, program control terminate the if else statement it does not check further.

You might be interested in
Assume the user types in 7 for x and 2 for y. What is output by the
vladimir1956 [14]

Answer:

49

Explanation:

3 0
2 years ago
Here's something to stop you from getting repetitive when writing essays. Write a program that reads multiple lines of plain tex
Marianna [84]

Answer:

The output is attached below

Explanation:

d = {}

while True:

line = input("Enter line: ")

if len(line)==0:

break

token = line.split(' ')

for var in token:

try:

if len(var)==0:

continue

count = d[var]

d[var] = count + 1

except KeyError:

d[var] = 1

pass

for word in sorted(d):

print(word , d[word])

------------------

7 0
3 years ago
Which game would be classified as an educational game
Masja [62]

Answer:

The various game types can be like board, video and card games. As far as educational video games are concerned they are made to explain to us some of the subjects which can be specific, as well as to teach a certain set of skills like role-playing. They are the interactive play that can help us learn the rules, goals, techniques to solve the problems. adaptation quality, as well as interactions, and all of these are being narrated in the form of a story. You should know that each game is a story in reality, and always. One can think of many such games, and like action games based on the military helps us learn how to fight a war.

Explanation:

Please check the answer.

7 0
3 years ago
This is the formula for the future worth of an investment over time with consistent additional monthly payments and a steady rat
stepladder [879]

Answer:

The code is given in C++ below

Explanation:

#include <iostream>

using namespace std;

int main()

{

float fv,pv,r,k,n,pmt,totalmoneyinvested;

pv=1000.00;

r=6/100;

k=12; //The value of k should be 12 for monthly installments

n=45;

pmt=250;

totalmoneyinvested=pv+(pmt*12*45); //The total money you invested

 

fv=pv*(1+r/k)*n*k+pmt*((1+r/k)*n*k-1)*(1+r/k)*r/k;

 

cout<<"Initial Investment:"<<" $"<<pv;

cout<<"\nRate Of Return:6%";

cout<<"\nLength of Time:"<<n<<"year";

cout<<"\nMonthly Payment:"<<" $"<<pmt;

cout<<"\nFinal Amount:"<<" $"<<fv;

cout<<"\nThe Money You Invested Is $"<<totalmoneyinvested<<" And The Final Amount Is $"<<fv;

return 0;

}

4 0
3 years ago
What happens when you press Ctrl Alt Delete twice?
Iteru [2.4K]
The same thing as if you do it once
6 0
3 years ago
Other questions:
  • To expand a window to the full size of the screen.​
    6·2 answers
  • Write an expression that executes the loop while the user enters a number greater than or equal to 0.
    10·1 answer
  • If we can lock a file, we can solve the race condition problem by locking a file during the check-and-use window, because no oth
    14·1 answer
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • Zack sees an online contest. He could win $10,000 instantly! On the sign-up form he enters his name and email address. He is als
    9·1 answer
  • Did it surprise you to discover that the Sun is actually a star in the middle of its life cycle? Why or why not?
    8·1 answer
  • Match the feature to its function.
    7·1 answer
  • PLEASE HELP WILL GIVE BRAINLIEST!!!’
    15·1 answer
  • What is the bandwidth for asymmetric digital subscriber line<br> (ADSL)?
    10·2 answers
  • Missing appropriate security hardening across any part of the application stack or improperly configured permissions is an examp
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!