Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by wkimball ( 5 years ago )
/**
* This program turns the inter average of 3 numbers
* @wkimball
* @2-25-21
*/
import java.util.Scanner;
public class Averageof3
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
//prompt 1
System.out.println("Give me a number");
int input1 = in.nextInt();
//prompt 2
System.out.println("Give me a second number");
int input2 = in.nextInt();
//prompt 3
System.out.println("Give me a third number");
int input3 = in.nextInt();
//This system evaluates the average of the 3 inputs
int average = (input1 + input2 + input3) / 3;
System.out.println("Your integer average is " + average );
}
}
Revise this Paste