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
fomenos
2 years ago
10

Given a String variable response that has already been declared, write some code that repeatedly reads a value from standard inp

ut into response until at last a Y or y or N or n has been entered. ASSUME the availability of a variable, stdin, that references a Scanner object associated with standard input.
Computers and Technology
1 answer:
OverLord2011 [107]2 years ago
5 0

Answer:

The following code is:

do     // set do while loop

{

response = stdin.next();    

}

while (response != "Y" || response != "y" || response != "N" || response != "n");

//  terminate do while loop

Explanation:

The following code starts with do while loop whose variables has already declared and then we assume the availability of the variable "stdin" which references the Scanner object and write some code to execute inside the do-while loop.

You might be interested in
Could this be restored? And is it worth the money it’d take?
Andreas93 [3]

yes, probably not, if you dont know anyone who can do it cheap or has the materials

7 0
3 years ago
Read 2 more answers
Which code will allow Joe to print Coding is fun. on the screen? print("Coding is fun.") print(Coding is fun.) print = (Coding i
ludmilkaskok [199]

Answer:

print(“Coding is fun.”)

Explanation:

The proper format for a print statement is usually you have the print statement followed by the string in quotes in parentheses.

Hope this helped!

7 0
3 years ago
Read 2 more answers
Write a program that reads two fractions such as 1/2 and 1/4 and computes and stores the sum, the difference, the product and th
Vesnalui [34]

Answer:

1: #include <iostream>

2: using namespace std;

3: int main()

4: {

5: int a,b,c,d;

6: cout<<"n1: ";

7: cin>>a;

8: cout<<"d1: ";

9: cin>>b;

10: cout<<"n2: ";

11: cin>>c;

12: cout<<"d2: ";

13: cin>>d;

14: int top = (a*d)+(b*c);

15: int bottom = b*d;

16: cout<<"Sum: "<<top<<"/"<<bottom<<"\n";

17: top = (a*d)-(b*c);

18: cout<<"Difference: "<<top<<"/"<<bottom<<"\n";

19: top = a*c;

20: cout<<"Product: "<<top<<"/"<<bottom<<"\n";

21: top = a*d;

22: bottom = b*c;

23: cout<<"Quotient: "<<top<<"/"<<bottom<<"\n";

24: return 0;

25: }

Explanation:

The Program is written in C++ programming language

The Program is left numbered

Line 5 was used for variable declaration.

Variables a,b represents the numerator and denominator of the first fraction

While variables c,d represent the numerator and denominator of the second fraction

Line 6 prints "n1" without the quotes which represents the numerator of the first fraction

Line 7 accepts input for the numerator of the first fraction.

Line 8 prints "d1" without the quotes which represents the denominator of the first fraction

Line 9 accepts input for the denominator of the first fraction.

Line 10 prints "n2" without the quotes which represents the numerator of the second fraction

Line 11 accepts input for the numerator of the second fraction.

Line 12 prints "d2" without the quotes which represents the denominator of the second fraction

Line 13 accepts input for the denominator of the second fraction.

Line 14 and 15 calculate the sum of the fractions which is then printed on line 16

Line 17 calculates the difference of the fractions which is then printed on line 18

Line 19 calculates the product of the fractions which is then printed on line 20

Line 21 and 22 calculates the quotient of the fractions which is then printed on line 23

5 0
3 years ago
Which statement best explains taxation without representation was a major issue for colonists?
Sauron [17]
Taxation without representation was a major issue for the colonists, because they were being unfairly taxed by the British without having a representative in the British Parliament to represent them ans state that they were against this. It was also one of the driving forces of the American Revolution, as it was just one of the grievances the colonists were experiencing from the British. 
4 0
3 years ago
Super computer in nuclear energy ​
satela [25.4K]

Answer:

Dubbed “El Capitan,” the supercomputer is part of the Exascale Computing Project, a DOE effort to increase computing power so that the department can run highly advanced simulations and modelling of the United States' nuclear arsenal. These simulations help alleviate the need for underground testing.

4 0
3 years ago
Other questions:
  • ATM is an abbreviation that stands for Automatic Teller machine?
    5·2 answers
  • Technician A says that front and rear U-joints on a RWD axle should operate at different angles to prevent vibration. Technician
    10·1 answer
  • List the steps in setting up an online banking account
    12·2 answers
  • CodeHS 3.4.5. What is the code for four colored triangles.
    8·1 answer
  • When a diaphragm contracts, a person is<br>Exhaling<br>Inhaling​
    12·2 answers
  • To drive defensively means taking proactive measures to avoid accident situations regardless of their potential causes.
    6·2 answers
  • Can i edit my name on this app?
    7·1 answer
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • How can you rotate and resize your drawing?​
    9·2 answers
  • E Highlight
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!