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
Naily [24]
4 years ago
6

Write an application that reads three integers, adds all three together, computes an average of the three entries, and computes

any remainder of the integer division. A remainder represents the modulus result of dividing an even by an odd number or vice versa. Display the output.
Engineering
1 answer:
Natali5045456 [20]4 years ago
3 0

Answer:

//The program prompts user to input three integers and it displays them, adds and gets their average

//begin

public class Test

{

  public static void Main()

  {

     //input intergers

int[] score = new int[3];

      int avg,rem,sum = 0;

     

      for(int i=0;i<3;i++)

      {

      Console.WriteLine("Enter an integer score ");

      score[i] = Convert.ToInt32(Console.ReadLine());

      sum = sum + score[i];

      }

      avg = sum/3;

      rem = sum%3;

     

      Console.WriteLine("The average of "+score[0]+","+score[1]+","+score[2]+" is "+avg +" with a remainder of "+rem);

     

  }

}

You might be interested in
java Your program class should be called RomanNumerals Write a program that asks the user to enter a number within the range of
Ann [662]

Answer:

// Scanner class is imported to allow program

// receive input

import java.util.Scanner;

// RomanNumerals class is defined

public class RomanNumerals {

   // main method that signify beginning of program execution

   public static void main(String args[]) {

       // Scanner object scan is created

       // it receive input via keyboard

       Scanner scan = new Scanner(System.in);

       // Prompt is display asking the user to enter number

       System.out.println("Enter your number: ");

       // the user input is stored at numberOfOrder

       int number = scan.nextInt();

     

           // switch statement which takes number as argument

           // the switch statement output the correct roman numeral

           // depending on user input

          switch(number){

           case 1:

               System.out.println("I");

               break;

           case 2:

               System.out.println("II");

               break;

           case 3:

               System.out.println("III");

               break;

           case 4:

               System.out.println("IV");

               break;

           case 5:

               System.out.println("V");

               break;

           case 6:

               System.out.println("VI");

               break;

           case 7:

               System.out.println("VII");

               break;

           case 8:

               System.out.println("VIII");

               break;

           case 9:

               System.out.println("IX");

               break;

           case 10:

               System.out.println("X");

               break;

           // this part is executed if user input is not between 1 to 10

           default:

               System.out.println("Error. Number must be between 1 - 10.");

     }

   }

}

Explanation:

The program is well commented. A sample image of program output is attached.

The switch statement takes the user input (number) as argument as it goes through each case block in the switch statement and match with the corresponding case to output the roman version of that number. If the number is greater 10 or less than 1; the default block is executed and it display an error message telling the user that number must be between 1 - 10.

6 0
3 years ago
Read 2 more answers
Some Tiny College staff employees i s are information technology (IT) personnel. Some IT personnel provide technology support fo
Westkost [7]

Answer:

solution in the picture attached

Explanation:

3 0
3 years ago
Compute the radius r of an impurity atom that will just fit into an FCC octahedral site in terms of the atomic radius R of the h
zhenek [66]

Answer:

<em>The Diameter of an atom that fits into the FCC is 2r,</em>

<em>Which leads to the final steps of 0414R</em>

Explanation:

<em>The diameter of an atom that  will fit into the FCC  site is  (2r) which differentiates  length edge unit cell for  the radii of two atoms that are seen on both side of the site (R); which is 2r = a – 2R</em>

<em>The  FCC is also a part of  R, therefore a=2R √2 </em>

<em> Solving for R, the equation is,  r =a-2R/2 =2R√2-2R/2 =0414R</em>

4 0
3 years ago
Determine the convention heat transfer coefficient inside the for the flow of (a) air and (b) water at a velocity of 2 m/s in an
Veronika [31]

Answer:

Find the attachments sequence wise for complete solution.

7 0
3 years ago
A second inventor was driving down the highway in her Prius one day with her hand out the window. She happened to be driving thr
Eva8 [605]

Answer:

Explanation:

It wouldn't work because the wind energy she would be collecting would actually come from the car engine.

The relative wind velocity observed from a moving vehicle is the sum of the actual wind velocity and the velovity of the vehicle.

u' = u + v

While running a car will generate a rather high wind velocity, and increase the power generated by a wind turbine, the turbine would only be able to convert part of the wind energy into electricity while adding a lot of drag. In the end, it would generate less energy that what the drag casuses the car to waste to move the turbine.

Regenerative braking uses an electric generator connected to the wheel axle to recover part of the kinetic energy eliminated when one brakes the vehicle. Normal brakes dissipate this energy as heat, a regenerative brake uses it to recharge a batttery. Note that is is a fraction of the energy that is recovered, not all of it.

A "regenerative accelerator" makes no sense. Braking is taking kinetic energy out of the vehicle, while accelerating is adding kinetic energy to it. Cars accelerate using the power from their engines.

6 0
3 years ago
Other questions:
  • A heat engine receives 6 kW from a 250oC source and rejects heat at 30oC. Examine each of three cases with respect to the inequa
    7·1 answer
  • 4. What is the best explanation of electric current in a wiRe 100+ PTS
    12·2 answers
  • Is there a way to get the answers to a NCCER book test?
    7·1 answer
  • Asolid rectangular rodhas a length of 90mm, made of steel material (E =207,000 MPa, Syield= 300 MPa), the cross section of the r
    14·1 answer
  • Which metal has the ability to rust
    15·2 answers
  • How has dissection used in engineering?
    9·2 answers
  • SE DEBE CONTRUIR UNA PARED QUE TENDRÁ 4 METROS DE LARGO POR 3 METROS
    11·1 answer
  • Connecting rods undergo a process to alleviate manufacturing stresses from forging, a process known as ______.​
    7·1 answer
  • How is an orthographic drawing similar to or different from an isometric drawing?
    14·2 answers
  • determine the components of each reaction at the ball and socket joint A and the tension in each cable necessary for equilibrium
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!