
*Please use StdIn. not Scanner. Thanks
Program:
public class MainClass
{
public static void main(String[] args)
{
// Reading input from stdIn using console
// NOTE: This will not work in IDE
// This will require std input
String line1 = System.console().readLine();
String line2 = System.console().readLine();
String line3 = System.console().readLine();
// Splitting input line into name and two integers
String[] name1 = line1.split(" ");
String[] name2 = line1.split(" ");
String[] name3 = line1.split(" ");
// integer variables to store 2 integers
int a, b;
// parsing 2 integers for 1st input line
a = Integer.parseInt(name1[1]);
b = Integer.parseInt(name1[2]);
// printing in required format
System.out.println(name1[0] + "\t" +a+"\t"+b+"\t"+String.format("%.3f",(double)a/b));
/* Repeating same steps for other 2 input lines */
a = Integer.parseInt(name2[1]);
b = Integer.parseInt(name2[2]);
System.out.println(name2[0] + "\t" +a+"\t"+b+"\t"+String.format("%.3f",(double)a/b));
a = Integer.parseInt(name3[1]);
b = Integer.parseInt(name3[2]);
System.out.println(name3[0] + "\t" +a+"\t"+b+"\t"+String.format("%.3f",(double)a/b));
}
}
Program Snippet:
![2 5 7 MainClass.java public class MainClass { 3 public static void main(String[] args) 4. { // Reading input from stdIn using](http://img.homeworklib.com/questions/e747f260-be91-11eb-99a4-6f0ac89b3ef3.png?x-oss-process=image/resize,w_560)

Output Snippet:

I hope you got the provided solution.
Thank You.
*Please use StdIn. not Scanner. Thanks Write a program that reads in lines from standard input...
Compose a program that reads in lines from standard input with each line containing a name and two integers and then uses writef() to write a table with a column of the names, the integers, and the result of dividing the first by the second, accurate to three decimal places. You could use a program like this to tabulate batting averages for baseball players or grades for students. PLEASE BE IN PYTHON :) ….
PLEASE DO THIS IN C#.Design and implement a program (name it ProcessGrades) that reads from the user four integer values between 0 and 100, representing grades. The program then, on separate lines, prints out the entered grades followed by the highest grade, lowest grade, and averages of all four grades. Format the outputs following the sample runs below. Sample run 1: You entered: 95, 80, 100, 70 Highest grade: 100 Lowest grade: 70 Average grade: 86.25
Write a PYTHON program that reads a file (prompt user for the input file name) containing two columns of floating-point numbers (Use split). Print the average of each column. Use the following data forthe input file: 1 0.5 2 0.5 3 0.5 4 0.5 The output should be: The averages are 2.50 and 0.5. a) Your code with comments b) A screenshot of the execution Version 3.7.2
Write a complete C++ program that reads students names and their test scores from an input text file. The program should output each student’s name followed by the test scores and the relevant grade in an output text file. It should also find and display on screen the highest/lowest test score and the name of the students having the highest/lowest test score, average and variance of all test scores. Student data obtained from the input text file should be stored...
Write a program that reads a file containing an arbitrary number of text integers that are in the range 0 to 99 and counts how many fall into each of eleven ranges. The ranges are 0-9, 10-19, 20-29,..., 90-99 and an eleventh range for "out of range." Each range will correspond to a cell of an array of ints. Find the correct cell for each input integer using integer division. After reading in the file and counting the integers, write...
Please don't use a void fuction and this is a c++ question.
Thanks
Write a program that reads two input files whose lines are ordered by a key data field. Your program should merge these two files, writing an output file that contains all lines from both files ordered by the same key field. As an example, if two input files contain student names and grades for a particular class ordered by name, merge the information as shown below Using...
c language with comments please!
Name this program one.c- This program reads integers from standard input until end-of-file (control-d) and writes them to either the file good or the file bad. Write the first number to the file good. After that, as long as the number is larger than the one it read before (the previous value, write that number to the file good. Otherwise, write that number to the file bad. Two sample executions are shown below good bad...
use Python and please comments every step.
[25] 6. Write a program that reads from standard input, two times in military format and prints the number of hours and minutes between the two times. Assume that the second time is always ahead of the first time. You should avoid using conditional statement (if-else) for this program. Your program must query the user for the two times and output the difference based on the two sample runs given below. Please enter...
Please help. I need a very simple code. For a CS 1 class. Write a program in Java and run it in BlueJ according to the following specifications: The program reads a text file with student records (first name, last name and grade). Then it prompts the user to enter a command, executes the command and loops. The commands are the following: "printall" - prints all student records (first name, last name, grade). "firstname name" - prints all students with...