Page 1 of 5 1234 ... LastLast
Results 1 to 10 of 49
  1. #1

    Default (Help) Parking Lot C Programming.


    Write a C program in to calculate the parking fare for customers who park
    their cars in a parking lot when the following information
    is given:

    A. A character showing the type of vehicle : C for car, B for bus,
    T for truck.
    B. An integer between 0 and 24 showing the hour the vehicle entered
    the lot.
    C. An integer between 0 and 60 showing the minute the vehicle entered
    the lot.
    D. An integer between 0 and 24 showing the hour the vehicle entered
    the lot.
    E. An integer between 0 and 60 showing the minute the vehicle left
    the lot.

    Different rates for each type of vechicle, as shown:
    VEHICLE : P0.00/hr first 3 hr P25.50/hr after 3 hr
    CAR : P1.00/hr first 2 hr P35.75/hr after 2 hr
    BUS : P25.00/hr first hr P43.40/hr after 1 hr

    No vehicle is allowed to stay in the parking lot later than midnight;
    it will be towed away.

    Then print the parking lot charge.



    Ing ini ang output sa Program.


    Type of Vehicle: Car/Bus/Truck

    Time In: xxx A/P/M/N (A = AM, P = PM, M = Midnight, N = Noon)
    Time Out: xxx A/P/M/N

    Parking Time: xxx
    Rounded Total: xxx

    Total Charge: P xx.xx


    Compiler Gamit: DL: http://www.mediafire.com/?3ezxc741z8ya8cf
    password: power



    Thanks sa mga Master......

  2. #2

    Default Re: (Help) Parking Lot C Programming.

    Code:
    #include<stdio.h>
    int main(void)
    {
      printf("Do your assignments, ayaw epasa sa laing taw..");
      return 1;
    }

  3. #3

    Default Re: (Help) Parking Lot C Programming.

    Naa nakoy code ini mga master pero naay problem sa output lagi.....

  4. #4

    Default Re: (Help) Parking Lot C Programming.

    Mao ni ang code:

    #include "stdafx.h"
    #include <stdio.h>
    #include <stdlib.h>
    Last edited by haxors; 02-18-2012 at 01:48 PM. Reason: confid

  5. #5

    Default Re: (Help) Parking Lot C Programming.

    naa mai error isa mga master.....tabangi ko be....

  6. #6

    Default Re: (Help) Parking Lot C Programming.

    maypa mangutana ka dri ug specific na question ayaw nang ang tibook code nmo imo gipost,
    if mangutana ka ug specific then naa pay motubag nmo, pangutana like "unsay pasabot ani na compile error ...?" or like sa imo gi ingn naay error, pangutana kng unsa about ang error..

    kaya na nmo bai, sabta jd pag ayu unsaon kng nahan jd ka ma hacker (based sa imo user name ug avatar)..

  7. #7

    Default Re: (Help) Parking Lot C Programming.

    Quote Originally Posted by cebugdev View Post
    maypa mangutana ka dri ug specific na question ayaw nang ang tibook code nmo imo gipost,
    if mangutana ka ug specific then naa pay motubag nmo, pangutana like "unsay pasabot ani na compile error ...?" or like sa imo gi ingn naay error, pangutana kng unsa about ang error..

    kaya na nmo bai, sabta jd pag ayu unsaon kng nahan jd ka ma hacker (based sa imo user name ug avatar)..

    sakto kaya ni nmo bai. pero xur q ni run nani....

  8. #8

    Default Re: (Help) Parking Lot C Programming.

    mga curly brackets nmo bai check daw. sa imo switches. mura ug gubot tanawn imo mga curly brackets.


    void charge(char* vehic, float* rate1, float* rate2, int ehour) {
    switch (*vehic) {
    case 'c':
    if (ehour <= 3) {
    *rate1 = 0.00;
    if (ehour > 3) *rate2 = 22.50 * (ehour - 3); ////////////saup ni xa dili ni xa matawag nga condition rate2 is always zero or null..
    }
    break;
    //////////// you continue check
    case 't': if (ehour <= 2)
    {
    *rate1 = 1.00 * ehour;
    if (ehour > 2)
    *rate2 = 2.30 * (ehour - 2);
    }
    break;
    case 'b': if (ehour <= 1)
    {
    *rate1 = 2.00 * ehour;
    if (ehour > 1)
    *rate2 = 3.70 * (ehour - 1);
    }
    break;
    }
    return;
    }

  9. #9

    Default Re: (Help) Parking Lot C Programming.

    ne run nani mga master pero naa problem dili cya mo count sa total.

  10. #10

    Default Re: (Help) Parking Lot C Programming.

    para dali nimo ma debug imo program.
    try to code it beautifully.
    naay gitawag na mga coding styles/standards. learn it as well.
    makita nimo mas dali mabasa imo code ug dali nimo makita ang sayop.

  11.    Advertisement

Page 1 of 5 1234 ... LastLast

Similar Threads

 
  1. C/C++ i need help in making a program
    By mE_bytes in forum Programming
    Replies: 54
    Last Post: 07-30-2008, 05:41 PM
  2. Need help in Installing Java programs in my Samsung D880
    By Soj in forum Software & Games (Old)
    Replies: 0
    Last Post: 04-24-2008, 06:34 PM
  3. Replies: 12
    Last Post: 04-17-2008, 04:48 PM
  4. Replies: 10
    Last Post: 03-06-2008, 05:26 AM
  5. NEED HELP ON ACCESS-based programming
    By recanada in forum Programming
    Replies: 1
    Last Post: 04-26-2006, 05:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top