0% found this document useful (0 votes)
19 views6 pages

Modified 1 M.P

This C program allows a user to track transportation vehicles (bus, cycle, rickshaw) and their details like numbers and total earnings. It has a menu driven interface to add vehicles, view details after login using a password, and delete/clear all details. Functions are defined to handle adding each vehicle type and updating counts and amounts. Login verifies the password and allows viewing or deleting the stored transportation details.

Uploaded by

vsingh3821
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Modified 1 M.P

This C program allows a user to track transportation vehicles (bus, cycle, rickshaw) and their details like numbers and total earnings. It has a menu driven interface to add vehicles, view details after login using a password, and delete/clear all details. Functions are defined to handle adding each vehicle type and updating counts and amounts. Login verifies the password and allows viewing or deleting the stored transportation details.

Uploaded by

vsingh3821
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Modified m.

p 1
#include<stdio.h>

#include<stdlib.h>

#include<string.h>

int menu();

void bus();

void cycle();

void riksha();

void deleted();

void showdetail();

void login();

int nor=0,nob=0,noc=0,amount=0,count=0;

char password[20];

char pass[] = "transport123";

void main()

while(1)

switch(menu())

case 1:

bus();
break;

case 2:

cycle();

break;

case 3:

riksha();

break;

case 4:

login();

break;

case 5:

exit(0);

default:

printf("\n invalid choice");

getch();

system("cls");

int menu()

int ch;

printf("\n1. enter bus:");


printf("\n2. enter cycle:");

printf("\n3. enter riksha:");

printf("\n4. login:");

printf("\n5. exit:");

printf("\n\n enter your choice:\n");

scanf("%d",&ch);

return(ch);

void deleted()

nob=0;

noc=0;

nor=0;

amount=0;

count=0;

void showdetail()

printf("\n no. of bus=%d", nob);

printf("\n no. of cycle=%d", noc);

printf("\n no. of riksha=%d", nor);

printf("\n total no. of vehicle=%d",count);


printf("\n total amount gain=%d",amount);

void riksha()

printf("\n entry successfull now again enter your choice");

nor++;

amount=amount+50;

count++;

void cycle()

printf("\n entry successfull now again enter your choice");

noc++;

amount=amount+20;

count++;

void bus()

printf("\n Entry successfull now again enter your choice");

nob++;

amount=amount+100;
count++;

void login()

int p;

printf("Enter password to login\n");

scanf("%s",password);

if(strcmp(pass,password)==0)

printf("Input 1 to show details and 2 to delete details\n");

scanf("%d",&p);

if(p == 2)

deleted();

printf("\nData deleted\n");

printf("\n");

printf("Returning to main menu\n");

else if(p == 1)

showdetail();

printf("\n");

printf("Returning to main menu\n");

printf("\n");
}

else

printf("Incorrect password\n");

printf("Returning to main menu\n");

printf("\n");

You might also like