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

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-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

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