14,930,311 members
See more:
```I am extremely new to programming, I had to take a C programming course in my college because it is mandatory and I have to idea what to do. I did not take an introductory course or anything like that so please help.Please don't get mad at me for not showing any code, it is because I have no idea what to write so please help as I do not like to fail this course.Thank you very much in advance.

Q1: e-voting system [3 marks] Electronic voting (also known as e-voting) is voting that uses electronic means to either aid or take care of casting and counting votes.

● Write a program that allows the admin to enter the number of candidates, number of regions, and the number of votes received by each candidate in each region and the first names of candidates in a local election. Then output each candidate’s name, the number of votes received, and the percentage of the total votes received by the candidate.

● The program should also output the winner of the election.

● The program should output the region where the winner gets the highest number of votes.

● Your program must contain parallel arrays and 2D array, and math library functions.

Q2: Fitness Center management system [3 marks] The cost to become a member of a fitness center is as follows: o Senior citizens discount is 30%, o If membership is bought and paid for 12 or more months, the discount is 15%, o If more than five personal training sessions are bought and paid for, the discount on each session is 20%.

● Write a menu-driven program that determines the cost of a new membership.

● Your program must contain a function that displays the general information about the fitness center and its charges.

● Write the function membershipCOST to determine the membership cost o The necessary information to determine the membership cost must be given in the main function (read them from user). o You need to determine the appropriate parameters of the function and the data the function should return. o you will need to call the function appropriately from the main and print the returned result with a useful message.

Q3: Lottery System [4 marks] The official Lottery website organizes a lottery game once a week. Five distinct random integers between 1 to 40 (inclusive) are drawn. If a player guesses all of the numbers correctly, the player wins a certain amount of money.

● Write function RANDLOTTERY, which generates, displays and returns one random number between 1 and 40 (inclusive). You should use a static variable to display the order of the drawn numbers and their value. A sample output (of calling the function 5 times) is: The first drawn number is: 34 The second drawn number is: 12 The third drawn number is: 1 The fourth drawn number is: 28 The fifth drawn number is: 17

● In the main program, the random numbers generated using the RANDLOTTERY function should be stored in an array.

● In the main program, prompt the player to select five distinct integers between 1 and 40 (inclusive) and store the numbers in an array.

● Write the function PREDICTLOTTERY, which accepts two integer values as parameters, the first from the random numbers array and the second from the player numbers array. o The function should count the number of lottery numbers guessed correctly. o You should use a global variable to count the correct guesses.

● If the player guessed the five lottery numbers correctly, the main program should display the message ‘‘You win!’’; otherwise, it outputs the number of correctly guessed numbers and the message ‘‘You lose!’’.

Thank you very much in advance.```

What I have tried:

nothing because i know nothing.
Posted
Updated 25-Apr-21 3:24am

## Solution 1

Quote:
nothing because i know nothing.
Then I am afraid you will need to start learning. See C Tutorial - Tutorialspoint[^].

## Solution 2

Quote:

If your claim is true, the only answer is a fail, any other answer is a cheat.
More or less, you are requested to win a formula 1 GP before learning to drive a car, which is absurd.

## Solution 3

That's not a "first program" in C at all - it's miles from the traditional "Hello World!" app we all started with.

And while we are more than willing to help those that are stuck: that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]