C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 28th, 2002, 09:56 AM
Neildadon Neildadon is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 12 Neildadon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How do i use functions in my project?

im designing a bus ticket program which has to display ticket information like total passengers,total cost etc,stop number and address

This is what i have done so far.

/* Bus Ticket program. A program which could be used to issue bus tickets.*/
/*Program by Neil Currie*/
/*BTEC NATONAL DIPLOMA COMPUTING AND I.T.*/

#include <conio.h>
#include <stdio.h>
#include <ctype.h>

#define TRUE 1
#define FALSE !(TRUE)

void main ()
{
char getstop;
int done;

clrscr();
gotoxy(30, 5);
printf("*******************");
gotoxy(30,6);
printf("Welcome to BromBus");
gotoxy(30,7);
printf("*******************");

gotoxy(5,10);
printf("Please select your bus stop number. \n");
printf("1 - Tesco.\n");

printf("= - Selection made:\n");

done=FALSE;
while(!done)
{
getstop=toupper(getch());
switch(getstop)
{
case '1':
printf("You have selected to travel to Tesco\n");
break;

case '=':
done=TRUE;
}
}
}

at the moment when a number 1 is typed it displays "you want to travel to tesco"

Do i need to get the answer to be assigned to a variable ? if so how?

whats the next stage in my program?

i need to use at least 3 functions but im not sure how to use functions and what to use as function for in this program.

and i have to display a summary of the ticket information for 15 seconds.

can anyone help please ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > How do i use functions in my project?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway