Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Daisy Brown   on May 31 In Java Category.

  
Question Answered By: Maria Miller   on May 31

import java.io.*;public class G{public static
void main(String[] args){<br>System.out.println("Grade
is "
+<br>(g("Quizes")*0.3+g("Homework")*0.2+g("Cummulative")*0.3+g("Midterm")*0.2));\
}<br>public static double g(String s){<br>StreamTokenizer t =
new StreamTokenizer(new
InputStreamReader(System.in));<br>try{System.out.println("Enter score for
"+s+"...");t.nextToken();}<br>catch
(IOException e){System.out.println(e);}return
t.nval;}}<br><br>Now your homework is to figure out the spacing...

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on INPUT AND OUTPUT PROGRAM Or get search suggestion and latest updates.


Tagged: