|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 ? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > How do i use functions in my project? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|