I am having trouble getting my program to come out right and need some help in order for me to get..

I am having trouble getting my program to come out right and need some help in order for me to get credit for the assignment, any help will be greatly appreciated,thanks in advance and it has to be in C sharp programming language.

Part B: Number Guessing Game

Step 1: Requirements

Write a Windows application that randomly generates a number from 0 through 100. Prompt the user to guess the number. Let the user know if the guess is too low, toohigh, or is the correct number. Give the user another chance to guess the number. The user keeps guessing until he or she gets it correct.

Sample Output: There was supposed to be boxes for the next few output's but couldn't get them to upload for me but I have the assignment up and what its supposed tohave in the code in C sharp programming language.

I entered a number and pressed the button.

I pressed the button and the box and message are cleared.

I entered a number and pressed the button.

After entering several numbers, I got the following:

Message displayed when the guess is right.

Step 2: Processing Logic

Using the pseudocode below, write the code that will meet the requirements.

Form constructor method

Randomly pick a target number between 0 and 100

Evaluate Button Click Event Handler Method

If the guess text box is not blank

Pull the guess from the text box

Add 1 to the number of guesses

If the guess is less than the target

Make the Evaluate button invisible

Change the label message to “Too Low!!”

Make the label message visible

Change the background color of the form to LightSeaGreen

Make the Try Again button visible

Else if the guess is greater than the target

Make the Evaluate button invisible

Change the label message to “Too High!!”

Make the label message visible

Change the background color of the form to SlateBlue

Make the Try Again button visible

Else

Display a message indicating the user guessed correctly and display

the number of guesses it took.

End-If

End-If

Try Again Button Click Event handler

Clear the guess text box

Make the label message and Try Again buttons invisible

Make the Evaluate button visible

Step 3: Create a new project

Create a new project and name it LAB6B.

Write your code using the Processing Logic in Part B Step 2. Make sure you save your program.

Step 4: Compile and Execute

a) Compile your program. Eliminate all syntax errors.

b) Build your program and verify the results of the program. Make corrections to the program logic if necessary until the results of the program execution are what youexpect.

Here is what I have so far for this program that wont compile so need help on what I am doing wrong. It is only my first programming class so any suggestions on how toget my program to come out right will be greatly appreciated. Thanks!!!

#include

#include

#include

char choice[3];

int main(void)

{

int num;

int randnum;

randnum = 1 + rand() % 1000;

printf(“I have a number between 1 and 1000.n”);

printf(“Can you guess my number?n”);

printf(“Please type your first guess: “);

scanf(“%d”, &num);

/*loop through untill user guesses number*/

while(num != randnum)

{

if(num

{

printf(“Too low. Try again.n”);

printf(“I have a number between 1 and 1000.n”);

printf(“Can you guess my number?n”);

printf(“Please type your first guess: “);

scanf(“%d”, &num);

printf(“n”);

}/*end if*/

if(num > randnum)

{

printf(“Too high. Try again.n”);

printf(“I have a number between 1 and 1000.n”);

printf(“Can you guess my number?n”);

printf(“Please type your first guess: “);

scanf(“%d”, &num);

printf(“n”);

}/*end if*/

if(num == randnum)

{

printf(“Excellent! You guessed the number!n”);

printf(“Would you like to play again (y or n)? “);

scanf(“%s”, &choice);

}/*end if*/

}/*end while*/

/*loop through untill user ends program*/

while(choice[0]=='y')

{

randnum = 1 + rand() % 1000;

printf(“I have a number between 1 and 1000.n”);

printf(“Can you guess my number?n”);

printf(“Please type your first guess: “);

scanf(“%d”, &num);

/*loop through untill user guesses number*/

while(num != randnum)

{

if(num

{

printf(“Too low. Try again.n”);

printf(“I have a number between 1 and 1000.n”);

printf(“Can you guess my number?n”);

printf(“Please type your first guess: “);

scanf(“%d”, &num);

printf(“n”);

}/*end if*/

if(num > randnum)

{

printf(“Too high. Try again.n”);

printf(“I have a number between 1 and 1000.n”);

printf(“Can you guess my number?n”);

printf(“Please type your first guess: “);

scanf(“%d”, &num);

printf(“n”);

}/*end if*/

if(num == randnum)

{

printf(“Excellent! You guessed the number!n”);

printf(“Would you like to play again (y or n)? “);

scanf(“%s”, &choice);

} /*end if */

}/*end inner while*/

}/*end outer while*/

getchar();

getchar();

return 0;

}

We are the Best!

course-preview

275 words per page

You essay will be 275 words per page. Tell your writer how many words you need, or the pages.


12 pt Times New Roman

Unless otherwise stated, we use 12pt Arial/Times New Roman as the font for your paper.


Double line spacing

Your essay will have double spaced text. View our sample essays.


Any citation style

APA, MLA, Chicago/Turabian, Harvard, our writers are experts at formatting.


We Accept

Secure Payment
Image 3