C Answers

Questions answered by Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

i want program for output below;


Welcome to Children Camping Program

Name: Suzana
Age: 9
More participants (y/n)? y

Name: Alia
Age: 10
More participants (y/n)? y

Name: Farhan
Age: 10
More participants (y/n)? y

Name: Ali
Age: 15
More participants (y/n)? n

Total Participants
Kids : 3
Teenagers: 1
A C program is needed for Children Camping Registration Day. The program has one user-defined function named Event( ). This function will ask 2 inputs from user (name and age), then it returns the participant’s age to main( ). If the participant is between 7 and 12 years old, the participant is considered as kid. If the participant is between 13 and 17 years old, the participant is considered as teenager. Write the program by implementing while loop and if-else statement.
An old Arabian legend has it that a fabulously wealthy but unthinking king agreed to give a beggar 1 Shilling and triple the amount for 10 days. Using this information, write, compile, and run a C program that displays how much the king must pay the beggar on each day and the total earned by the beggar at the end of the 10day period. The output of your program should appear as follows:
Day Amount Owed Running total earned
1 1 1
2 3 4
3 27 31
. .
. .
10.
You have a block of platinum that can be exchanged in your bank either for cash
or for smaller blocks of platinum. If you exchange a block of m grams, you get
three blocks of weight m/2, m/3 and m/4 grams each. You don't get any fractional
part, as the division process rounds down the value. If you exchange the block of
platinum for cash, you get m units of currency. You can do any number of
exchanges for smaller blocks or currency.
Given the value of a block in grams as input, write a program that would print the
largest possible currency value that you can receive as the output. Assume that
the maximum value of a block that can be given as an input is 1,000,000,000
grams and the minimum value is 2 grams.
Sample input 1
12
Sample output 1
13
How can i get the 3 least minimum data from an array set and display the answers with the corresponding months of those data.
list all types of tokens in the c language ? and for each type list its attribute ?
main( )
{
int i = 20 ;
display ( i ) ;
}

display ( int j )
{
int k = 35 ;
printf ( "\n%d", j ) ;
printf ( "\n%d", k ) ;
}
what is the output of this program??
Write a C program to do the following tasks:

For Example, the results of the elections have been reported for each state as follows:
City
Clinton
Trump
James
Robert
New York
187
52
166
297
California
37
70
212
27
Pennsylvania
20
179
112
45
Florida
244
121
308
19
Texas
251
33
212
35

Write a program to do the following:
• Print the table with appropriate labels for the rows and columns.
• Compute and display the total number of votes received by each candidate and the percentage from the total votes.
• For each city, write the candidate name that has the highest number of votes.
• If any one candidate received over 50% of the votes, the program should display a message declaring that candidate the winner.
• If no candidate received over 50% of the votes, a second round should be done between the top two highest of the candidates. Display a message that mention the names of the top two candidates.
• The data should be read from a text file votes.txt.
4. Write a menu driven program:
a. to read details of ‘n’ products
b. search product by ID and display, if found
c. search products by category and display all, if found
d. display products whose price is greater than Rs.500
If there is a space to park the vechiles then some n number of vechiles are parked there and then count how many are of cars, and how many of are scooters and note the arrival time and the departure time, display the order of parked vechiles, and the color of vechile,if he wants to take the vehicle from the parking he has to tell the number of vehicle if the number is wrong he can’t able to take the vehicle from parking in that case he has to tell the car model and the color of vehicle and also the rc book of vehicle and also he has to calculate the parking fees based on time he kept.
LATEST TUTORIALS
APPROVED BY CLIENTS