Help with Java
1
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)
2
Name:
Anonymous
2009-02-04 19:09
Quick, somebody get a mod in here.
3
Name:
Anonymous
2009-02-04 19:09
You're doing programming . Get used to problem solving .
4
Name:
Anonymous
2009-02-04 19:10
bro, i cut u
5
Name:
Anonymous
2009-02-04 19:10
op here,
my life depends on this problem
6
Name:
Anonymous
2009-02-04 19:14
>>5
It's been nice knowing you!
7
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
8
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");
9
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?
10
Name:
Anonymous
2009-02-04 20:04
OP HERE,
I LOVE 4CHAN..
>>8
REVERSE / WITH %
11
Name:
Anonymous
2009-02-04 20:22
12
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
13
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
14
Name:
Anonymous
2009-02-05 3:42
>>13
that is the gayest #define evar
15
Name:
Anonymous
2009-02-09 23:33
bump
16
Name:
Anonymous
2009-02-09 23:41
>>14
evar
www.usingenglish.com
And
back to /b/, please.
17
Name:
Anonymous
2009-02-09 23:50
>>14
that is the gayest
>>14 evar
18
Name:
Anonymous
2009-02-10 3:27
19
Name:
Anonymous
2009-02-10 3:48
^ ^ ^ ^ V^^^^
20
Name:
Anonymous
2009-02-10 3:52
<<< < <<< < <
21
Name:
Anonymous
2009-02-10 21:37
>>18
>>17
PROOF OR STFU NOOB
that is the gayest >>14 evar[1]
REFERENCES
[1]
>>14
22
Name:
Trollbot9000
2009-07-01 9:42
Goodbye and good riddance.