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
igor_vitrenko [27]
3 years ago
12

Write a program that asks the user to type 5 integers

Computers and Technology
1 answer:
AnnZ [28]3 years ago
5 0

import Java.util*

public class Average{
public static void main(String [] args){

int sum = 0;
int numbers = 0;

for(int i = 0; i < 5; i++){
Scanner sc = new Scanner(System.in);
System.out.println(“Please enter your integers: “);
numbers = sc.nextInt();

sum += numbers;
}
System.out.println(“The average is: “ + sum/5)”
}
}
You might be interested in
Protected base class members cannot be accessed by: a.friends of the base class.
tatyana61 [14]

Answer:

The answer is "Option d".

Explanation:

This class members can be accessed by their member and the friend of there class, It is also known as the Members of the derived class from the basic class can be accessed by the protected and non-static member of the base class, and wrong choices can be described as follows:

  • Option a and Option b both are wrong because non-static member can't be accessed by there base or derived class.
  • In option c, It is wrong because the function is a member function of the derived class.
7 0
3 years ago
Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to
Brrunno [24]

Complete Question:

Write a C# program named *ProjectedRaises* that includes a named constant representing next year’s anticipated 4 percent raise for each employee in a company. Also declare variables to represent the current salaries for three employees. Assign values to the variables, and display, with explanatory text, next year’s salary for each employee.

Convert the *ProjectedRaises* class to an interactive application named **ProjectedRaisesInteractive**. Instead of assigning values to the salaries, accept them from the user as input.

Answer:

The code in C# is provided in the explanation section

Explanation:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using static System.Console;

namespace ProjectedRaisesInteractive

{

   class ProjectedRaisesInteractive

   {

       static void Main(string[] args)

       {

           

           const double percentIncrease = 1.04;

           double inputFirstSalary = 0;

           double inputSecondSalary = 0;

           double inputThirdSalary = 0;

           double outputFirstSalary = 0;

           double outputSecondSalary = 0;

           double outputThirdSalary = 0;

           //skip error checking

           Write("Enter Value for First Salary");

           inputFirstSalary = double.Parse(ReadLine());

           Write("Enter Value for Second Salary");

           inputSecondSalary = double.Parse(ReadLine());

           Write("Enter Value for Third Salary");

           inputThirdSalary = double.Parse(ReadLine());

           outputFirstSalary = inputFirstSalary * percentIncrease;

           outputSecondSalary = inputSecondSalary * percentIncrease;

           outputThirdSalary =  inputThirdSalary * percentIncrease;

WriteLine("Expected Salary Increase:{0}", percentIncrease;);

WriteLine("{0} will be {1} next year.", inputFirstSalary, outputFirstSalary);

WriteLine("{0} will be {1} next year.", inputSecondSalary, outputSecondSalary);

WriteLine("{0} will be {1} next year.", inputThirdSalary, outputThirdSalary);

       }

   }

}

7 0
3 years ago
Explain the limitations of the old economy<br>​
pickupchik [31]

Explanation:

Time Constraint and Time Consuming: Nobody would carry out business when the market was closed. ... Limited Space: The old economy depended on physical space such as market places and offices before business transaction could take place.

7 0
3 years ago
Write a C++ program using a do while loop for (Find the highest score). The program should work for any number of students. Run
alexdok [17]

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int highest = 0;
  6.    int score;  
  7.    do{
  8.        cout<<"Input a score: ";
  9.        cin>>score;
  10.        
  11.        if(score > highest){
  12.            highest = score;
  13.        }    
  14.    }while(score >= 0);
  15.    
  16.    cout<<highest;
  17.    return 0;
  18. }

Explanation:

Firstly, create a variable highest and initialize it with zero (Line 5). Next, create a do while loop (Line 7 - 14). Within the loop prompt user to input a score (Line 8-9) and if the current score is higher than the highest variable, assign the score to highest variable (Line 11 - 13).

After finishing the loop when user put in any negative value, the program shall be able to print out the highest input score (Line 16).

8 0
3 years ago
A company is in the middle of an operating system update to Windows 10 from Windows XP, Windows 7, and Windows 8.x. The diverse
Romashka-Z-Leto [24]

Answer:

Option A is the correct option.

Explanation:

The following option is true because when the user or any organization is installing the updates of an operating system and then, some technicians that its failure and they observe that 100% usage of the computer's CPU is done and the user takes the advice of the technicians regarding to the following queries then, they tell them the following problem is that there is an insufficient numbers of the physical processor cores.

8 0
3 years ago
Other questions:
  • What is Linux an example of
    6·1 answer
  • A contractor is preparing a bid to install swimming pools at a new housing addition. The estimated time to build the first pool
    12·1 answer
  • The user can set their own computer hostname and username. Which stage of the hardware lifecycle does this scenario belong to?
    6·1 answer
  • Information about a computer file, not the actual data that is contained in the file, is called ______
    8·2 answers
  • Angelina has added page numbers to her report, but all of the pages are labeled "Page 1" at the bottom. What caused
    8·2 answers
  • Ba esti prost?<br> Ba esti nebun?<br> Ce ai?
    5·2 answers
  • Define client and.server​
    13·1 answer
  • WAP to find the area of cuboid​
    13·1 answer
  • How does a python programmer concatenate a numeric value to a string value?
    7·1 answer
  • What physical disk oriented performance counter should be used to determine the number of requests waiting to be processed by a
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!