// Arup Guha
// 1/17/06 COP 3330
// This example shows how to read in a String, integer and double using a
// Scanner object.

import java.util.*;

public class TipChart {

  public static void main(String[] args) {

    Scanner stdin = new Scanner(System.in);

    // Read in the user's name.
    System.out.println("Enter your name (no spaces)");
    String name = stdin.next();

    // and their tip rate,
    System.out.println("Enter your desired tip rate.");
    double rate = stdin.nextDouble();

    // and the most expensive meal they can have.
    System.out.println("Enter the max value of your meal.");
    int maxVal = stdin.nextInt();

    // Print out the chart!
    System.out.println(name+", here is your tip chart!");
    System.out.println("Meal Value\tTip Amount");
    for (int i=1; i<=maxVal; i++)
      System.out.println(i+"\t\t"+(i*rate));
 
  } // end main
} // end TipChart
