C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include<stdio.h>
int main()
{
int bidder1, bidder2, bidder3,exp=0,profit,loss,vehcst,dep, sum=0, bid;
bid= bidder1, bidder2, bidder3;
char regno[8];
/*Code to pick vehicle details*/
{
printf("\nEnter Vehicle Details(Registration Number & Original Cost(i.e. UAJ987K)):\n");
scanf("%s %d",®no,&vehcst);
system("cls");
printf("\n-------------------------------------------------\n");
printf("Registration Number\tVehicle cost");
printf("\n-------------------------------------------------\n");
printf("\t%s\t\t\t%d",regno,vehcst);
printf("\n-------------------------------------------------\n");
system("pause");
}
/*Code to pick three bidders info ie the amounts they have chosen to bid*/
printf("\nEnter three bidders:\n\n");
scanf("%d %d %d", &bidder1, &bidder2, &bidder3);
/*Calculate the highest bidder out of the three bidders*/
if(bidder1 > bidder2 && bidder1 > bidder3)
{
printf("%d is the highest amount bidded\n", bidder1);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run