Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Help with Java

Name: Anonymous 2009-02-04 19:07

I need basic help to try to display the final line. i have tried

System.out.print("The airplane can fly for " + flightMinutes + " minutes");

but it displays only in minutes (ex. 96min). i need it to display it as: 1 hour(s) and 36 minute(s)

Enter the number of pounds of fuel onboard: 45
Enter the number of pounds of fuel added: 180
Enter the number of pounds of fuel needed for takeoff: 20
Enter the number of pounds of fuel needed for landing: 12
Enter the number of pounds of fuel burned per minute: 2

The airplane can fly for 1 hour(s) and 36 minute(s)

Name: Anonymous 2009-02-04 19:09

Quick, somebody get a mod in here.

Name: Anonymous 2009-02-04 19:09

You're doing programming. Get used to problem solving.

Name: Anonymous 2009-02-04 19:10

bro, i cut u

Name: Anonymous 2009-02-04 19:10

op here,

my life depends on this problem

Name: Anonymous 2009-02-04 19:14

>>5
It's been nice knowing you!

Name: Anonymous 2009-02-04 19:14

>>5
So you should be even more motivated to solve it on your own.
I'll be nicer: look at >>2

Name: Anonymous 2009-02-04 19:19

public static final long MINUTES_PER_HOUR = 60L;

System.out.print("The airplane can fly for " + (flightMinutes % MINUTES_PER_HOUR) + "hour(s) and " + (flightMinutes / MINUTES_PER_HOUR) + " minutes");

Name: Anonymous 2009-02-04 19:20

i'm kinda shok'd. u guys wont help me. bye bye.

can someone help me write a "Good bye, World" program?

Name: Anonymous 2009-02-04 20:04

OP HERE,

I LOVE 4CHAN..

>>8
REVERSE / WITH %

Name: Anonymous 2009-02-04 20:22

>>8
Fuck you

Name: Anonymous 2009-02-05 1:15


#include <sys/types.h>  // pid_t
#include <signal.h>     // kill, SIGKILL
#include <unistd.h>     // getpid
#include <stdio.h>      // printf
#include <stdlib.h>     // EXIT_FAILURE

// suicide program as per request of >>9
int main() {
   pid_t self = getpid();

   printf("Goodbye World. :(\n");

   kill(self, SIGKILL);

   return EXIT_FAILURE;
}


12:13 AM ~/tmp
$ gcc -ansi -Wall -std=gnu99 ./goodbyeWorld.c -o ./goodbyeWorld

12:13 AM ~/tmp
$ ./goodbyeWorld
Goodbye World. :(
Killed

Name: Anonymous 2009-02-05 1:21

>>12
kill(self, SIGKILL);

should be changed to


#define FAIL -1 // placed before "int main()"
if (kill(self, SIGKILL) == FAIL) {
   perror("Suicide failure");
}


gotta check for those errors, eh

Name: Anonymous 2009-02-05 3:42

>>13
that is the gayest #define evar

Name: Anonymous 2009-02-09 23:33

bump

Name: Anonymous 2009-02-09 23:41

>>14

evar

www.usingenglish.com

And

back to /b/, please.

Name: Anonymous 2009-02-09 23:50

>>14
that is the gayest >>14 evar

Name: Anonymous 2009-02-10 3:27

>>17
PROOF OR STFU NOOB

Name: Anonymous 2009-02-10 3:48

^^^^V^^^^

Name: Anonymous 2009-02-10 3:52

<<<<<<<<<

Name: Anonymous 2009-02-10 21:37

>>18
>>17
PROOF OR STFU NOOB
that is the gayest >>14 evar[1]

REFERENCES           
[1] >>14

Name: Trollbot9000 2009-07-01 9:42

Goodbye and good riddance.

Don't change these.
Name: Email:
Entire Thread Thread List