Page 7 of 8 FirstFirst 12345678 LastLast
Results 91 to 105 of 114

Thread: Control + V: Dump

  1. #91
    Ominous Wanderer Tech Admin Samuraid's Avatar
    Join Date
    Oct 2001
    Posts
    5,522

    Default

    Quote Originally Posted by crono_logical View Post
    My clipboard appears to be empty, or does not contain pastable text at the moment
    Aye, same here.

  2. #92
    GO! use leech seed! qwertysaur's Avatar
    Join Date
    Dec 2006
    Location
    Kanto
    Posts
    11,627
    Contributions
    • Former Site Staff

    Default


  3. #93

  4. #94
    diafnaoplzkthnxbai NeoTifa's Avatar
    Join Date
    Jun 2005
    Location
    in psy's panties <3
    Posts
    3,411

    Default

    my god this is still alive?

    package cs240project3;

    /*
    *************************************************************************
    *
    * @author Erica
    * @date 10-28-08
    *
    * This program offers the user a set of 4 shapes they can draw
    * to the screen with asterisks (*). It also prompts whether or
    * not they want the shape filled or not. The user has the option of
    * chosing the deminsions of the shape, and has 3 tries to get it
    * within the limits.
    *
    * ***********************************************************************
    */

    //Imports
    import java.util.Scanner;

    public class Main {

    public static void main(String[] args) {

    //Variables
    int counter = 3; //The "x tries left" counter
    String choice_s; //Input string for the shape
    char uchoice_s; //First letter of string_s
    String choice_f; //Input string for un/filled option
    char uchoice_f; //First letter of string_f

    //Main program loop
    while (counter != 0) {

    //Prompts user for their choice of shape or quit (menu)
    Scanner input = new Scanner(System.in);
    System.out.print("What do you wish to draw? \n" +
    "(B for a box, R for a right triangle,\n" +
    "I for an isoceles triangle, D for diamond,\n" +
    "or Q to quit)");

    //Finds the first letter of input to use as the switch case for their option
    choice_s = input.nextLine();
    uchoice_s = choice_s.charAt(0);

    //Switch statement that relates to the input
    switch (uchoice_s) {
    case (66): //'B'
    case (98): //'b'

    //Prompts the user if they want their box un/filled and
    //draws the appropiate shape
    System.out.println("Do you want your box filled (F) " +
    "or unfilled (U)?");
    Scanner inputfilled = new Scanner(System.in);
    choice_f = inputfilled.nextLine();
    uchoice_f = choice_f.charAt(0);

    switch (uchoice_f) {

    case (70): //'F'
    case (102): //'f'

    int columns;
    int rows;

    System.out.println("Type the diminsions for the box" +
    " by typing the number of colums followed by" +
    " the number of rows.\n" +
    "(e.g. 10 20)");

    Scanner dim = new Scanner(System.in);
    columns = dim.nextInt();
    rows = dim.nextInt();

    testbox(columns, rows);

    if (testbox() = true)
    box_f(rows, columns);
    else {
    counter--;
    System.out.println("The diminsions are not in range.");
    System.out.print("Try again. \nYou have " +
    counter + " tries left!");
    }

    break;

    case (85): //'U'
    case (117): //'u'

    box_u();
    break;
    }
    break;

    case (82): //'R'
    case (114): //'r'

    //Same as box, only for a triangle
    System.out.println("Do you want your right triangle filled (F) " +
    "or unfilled (U)?");
    inputfilled = new Scanner(System.in);
    choice_f = inputfilled.nextLine();
    uchoice_f = choice_f.charAt(0);

    switch (uchoice_f) {
    case (70): //'F'
    case (102): //'f'

    rtriangle_f();
    break;

    case (85): //'U'
    case (117): //'u'

    rtriangle_u();
    break;
    }
    break;

    case (73): //'I'
    case (105): //'i'

    //Ditto
    System.out.println("Do you want your isoceles triangle filled (F) " +
    "or unfilled (U)?");
    inputfilled = new Scanner(System.in);
    choice_f = inputfilled.nextLine();
    uchoice_f = choice_f.charAt(0);

    switch (uchoice_f) {
    case (70): //'F'
    case (102): //'f'

    itriangle_f();
    break;

    case (85): //'U'
    case (117): //'u'

    itriangle_u();
    break;
    }
    break;

    case (68): //'D'
    case (100): //'d'

    //You know the drill by now (only for a diamond this time)
    System.out.println("Do you want your diamond filled (F) " +
    "or unfilled (U)?");
    inputfilled = new Scanner(System.in);
    choice_f = inputfilled.nextLine();
    uchoice_f = choice_f.charAt(0);

    switch (uchoice_f) {
    case (70): //'F'
    case (102): //'f'

    diamond_f();
    break;

    case (85): //'U'
    case (117): //'u'

    diamond_u();
    break;
    }
    break;

    case (81): //'Q'
    case (113): //'q'

    //Quits the program
    System.out.println("Quitting...");
    counter = 0;
    break;

    default:
    counter--;
    System.out.print("Try again. \nYou have " + counter + " tries left!");
    break;
    }
    }
    }

    public static boolean testbox(int columns, int rows) {

    boolean test;

    if (rows <= 0 || columns <= 0 || columns >= 80)
    test = false;
    else
    test = true;

    return test;
    }

    public static void box_f(int columns, int rows) {



    for (int i = 0; i < rows; i++) {
    for (int j = 0; j < columns; j++) {
    System.out.print("*");
    }
    System.out.print("\n");

    }

    }

    public static void box_u() {
    int columns;
    int rows;

    System.out.println("Type the diminsions for the box" +
    " by typing the number of colums followed by" +
    " the number of rows.\n" +
    "(e.g. 10 20)");

    Scanner dim = new Scanner(System.in);
    columns = dim.nextInt();
    rows = dim.nextInt();

    for (int i = 0; i < rows; i++) {
    for (int j = 0; j < columns; j++) {
    if (i == 0 || i == rows - 1 || j == 0 || j == columns - 1) {
    System.out.print("*");
    } else {
    System.out.print(" ");
    }
    }
    System.out.print("\n");

    }

    }

    public static void rtriangle_f() {

    System.out.println("How big do you want your base?");
    Scanner dim = new Scanner(System.in);
    int base = dim.nextInt();

    for (int i = 0; i < base; i++){
    for (int j = 0; j < i + 1; j++)

    System.out.print("*");

    System.out.print("\n");
    }

    }

    public static void rtriangle_u() {

    System.out.println("How big do you want your base?");
    Scanner dim = new Scanner(System.in);
    int base = dim.nextInt();

    for (int i = 0; i < base; i++){
    for (int j = 0; j < i + 1; j++)
    if (i == base - 1)
    System.out.print("*");
    else if (j == 0 || j == i)
    System.out.print("*");
    else
    System.out.print(" ");
    System.out.print("\n");
    }


    }

    public static void itriangle_f() {

    System.out.println("How big do you want your base?" +
    "(Odd number only please)");
    Scanner dim = new Scanner(System.in);
    int base = dim.nextInt();
    int rows = base / 2;

    for (int i = 0; i <= rows; i++) {
    for (int j = 0; j < rows - i; j++) {
    System.out.print(" ");
    }
    for (int j = 0; j < 2 * i + 1; j++) {
    System.out.print("*");
    }

    System.out.print("\n");
    }
    }

    public static void itriangle_u() {

    System.out.println("How big do you want your base?" +
    "(Odd number only please)");
    Scanner dim = new Scanner(System.in);
    int base = dim.nextInt();
    int rows = base / 2;

    for (int i = 0; i <= rows; i++) {
    for (int j = 0; j < rows - i; j++) {
    System.out.print(" ");
    }
    for (int j = 0; j < 2 * i + 1; j++) {
    if (i == rows)
    System.out.print("*");

    else if (j == 0 || j == 2 * i)
    System.out.print("*");

    else
    System.out.print(" ");

    }


    System.out.print("\n");
    }



    }

    public static void diamond_f() {

    System.out.println("Diz are diamond_f!!!");



    }

    public static void diamond_u() {

    System.out.println("Diz are diamond_u!!!");



    }
    }


    //The end ^_^





    ...o.o oh yea
    Oh gods, why? ಥ_ಥ


  5. #95
    Gold is the new black Goldenboko's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    16,136
    Articles
    39
    Blog Entries
    1
    Contributions
    • Former Editor
    • Hosted the Ciddies

    Default

    DESTROY!

  6. #96
    Banned
    Join Date
    May 2007
    Location
    UK
    Posts
    8,125
    Blog Entries
    17

    Default

    Quote Originally Posted by Goldenboko View Post
    DESTROY!
    Oh god, I know why he copied that. D =

  7. #97
    diafnaoplzkthnxbai NeoTifa's Avatar
    Join Date
    Jun 2005
    Location
    in psy's panties <3
    Posts
    3,411

    Default

    oh, i thought he was talking about my codez, cuz thats what im about to do. i just hope i dont get a zero on it lulz, cuz it was due yesterday and im only half done
    Oh gods, why? ಥ_ಥ


  8. #98

    Default

    Saw a show and bought shetloads of clothes

  9. #99

    Default

    Marilyn Chambers

  10. #100

  11. #101
    I'm selling these fine leather jackets Aerith's Knight's Avatar
    Join Date
    Jul 2005
    Location
    The Netherlands
    Posts
    10,825
    Blog Entries
    1


  12. #102
    Ogre Araciel's Avatar
    Join Date
    Aug 2006
    Location
    Waterdeep
    Posts
    9,424

    Default

    It ruins your breath, seriously.

  13. #103
    Formerly NewBlackMage Fate Fatale's Avatar
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    1,465

    "Everything has a purpose. It's your life's mission to find yours."

  14. #104

  15. #105

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •