Jump to content

Orange

Trade With Caution
  • Posts

    1092
  • Joined

  • Last visited

  • Feedback

    97%

Posts posted by Orange

  1.  

    4 minutes ago, Saiyan said:

    Sike it's his birthday, according to snapchat :kappa: 

    7a5ac9d3c95f1637f7daf0a4c566842c.jpg

     

    Credits to @Sysm for editing the cake :)

    You'll always be TWC :doge: 

    Thanks bro, (its actually feb 17, but still the 16th here)

    3 minutes ago, Mio said:

    :kappa:

    :doge:

    2 minutes ago, Jordy said:

    Lol the gang.

    gang gang

    2 minutes ago, Jordan said:

    make a wish!

    That one day everyone will realize that twc lives matter to!

    2 minutes ago, AdnaneSen said:

    His face when he read the thread title :P fucking skemmer kid

    :kappa: at least I got a thread

    2 minutes ago, ProjectPact said:

    REKT

    <3 

    1 minute ago, Sysm said:

    dank edit :doge::kappa:

    Good looking cake 

    • Like 4
  2. 4 minutes ago, Mumble said:

    Maybe just order of operations on line 20

     

    at the end of it you do / x * y * z

    The computer sees this as (NUMBER/x)*y*z

     

    so maybe try to add paranthesis

    Thanks so much !!! I feel like a noob for not thinking about this, I've spent hours over this past week trying to figure out what I did wrong in the equation and it never occured to me to put () around the xyz part :facep: , thanks man I owe you one :doge: 

    • Like 1
  3. Ok so I'm basically done with my project, and I am given several different numbers to input to test it. When I type in 1 for the x,y, and z values I get the correct answer, but if I type in 2, 3, etc I get the wrong answer (I checked with a calculator). So I assume somewhere I typed my equation wrong or perhaps its executing in the wrong order.

     

    This is the equation that I must use:

    http://prntscr.com/e18inb

     

    This is my code for the project, and the equation is on lines 20 & 38 (at the bottom is where I run the program with the 2 for x,y,z the answer should be around 7.8 but I get -94):

    http://prntscr.com/e18jtg

     

    Thanks for the help

     

  4.  

    I'm taking computer programming in school and we're doing Java in JGrasp and I'm failing to add a value to a integer I already have defined.

    The program is a ticket calculator for speeding

    1. All tickets will start with a minimum amount of $75.
     
    2. An additional $6 is charged for every mph over the posted speed limit.
     
    3. If you are traveling over 30mph over the posted speed limit, an additional $160 is charged.
     
    4. If the speeding occurred in a school zone, the cost of the ticket is doubled.
     
    Failing on step 2, and I'm new to java so don't judge my stupidity lol.
     

    System.out.println("What is the posted speed limit)? -->" );

    int speedlimit = Expo.enterInt();

    int ticketcost = 0;

    System.out.println("How fast was the car travelling in mph? -->");

    int speed = Expo.enterInt();

    if(speed > speedlimit)

    {

    ticketcost+=75;

    }

    int excess = 0;

    speedlimit is the speedlimit of the area,
    speed is the speed of the car, and excess is every mile over,
    was gonna write something along the lines of  speedlimit minus speed is the excess, and add multiplay excess by 6 and add it to my final ticket cost at the end of my program.
    sorry if I wrote this badly, I don't know how to explain it and its messy but I've tried writing it like 4 different ways and im confused lol. (We're using some online book and I'm just copying his skeleton for my work if it looks bad)
     

     

     1 // Lab07Ast.java

     2 // The Speeding Ticket Program

     3 // This is the student, starting version of Lab 07A.

     4

     5

     6 public class Lab07Ast

     7 {

     8    public static void main(String args[])

     9    {

    10       System.out.println("Lab 07A, 100 Point Version");

    11          System.out.println();

    12          System.out.println("The Speeding Ticket Program");

    13          System.out.println();

    14         System.out.println("By: Drew");  // Substitute your own name here.

    15         System.out.println("\n==============================\n");

    16        

    17        

    18        

    19          System.out.println("What is the posted speed limit)? -->" );

    20          int speedlimit = Expo.enterInt();

    21          int ticketcost = 0;

    22         

    23         

    24         

    25         

    26          System.out.println("How fast was the car travelling in mph? -->");

    27          int speed = Expo.enterInt();

    28          if(speed > speedlimit)

    29          { 

    30             ticketcost+=75;

    31          }

    32          int excess=((speed - speedlimit) * 6);

    33                   if(excess >= speedlimit + 30)

    34                   {

    35                   ticketcost+=160;

    36                   }

    37          ticketcost+= excess;

    38          System.out.println("Did the violation occur in a school zone?");

    39          char school = Expo.enterChar();

    40         

    41          switch (school)

    42          {

    43             case 'Y':

    44             case 'y':

    45             ticketcost*= 2;

    46              break;

    47             case 'N':

    48             case 'n':

    49              ticketcost*= 1;

    50             break;

    51          }  

    52         

    53

    54             System.out.println("Ticket amount: " + ticketcost);

    55         

    56          

    57

    58

    59

    60

    61

    62       System.out.println();

    63    }

    64 }

    ^ edit for tHE LAST TIME I actually got the riGHT ANSWER FINALLY

     

    Random question what state do you live in ?

  5. need the following done:

     

    haunted mine

    itcharlin's little helper

    ghosts ahoy

    elemental workshop 2

    wanted

    slug menace

    one small favour

    contact

    spirits of the elid

    the giant dwarf

×
×
  • Create New...