hi i need help about this home works as soon as possible
thank you
i have two assignments
this is first one:
In one file:
Part A
Redo Project 3. This time when the user enter n, h0, esp, your code will print the height after each rebound till n. This means if the user enters n = 4, your code will print:
After rebound # 1, the height of the ball is: …
After rebound # 2, the height of the ball is: …
After rebound # 3, the height of the ball is: …
After rebound # 4, the height of the ball is: …
Part B
Create a game that asks the user to guess the number between 0 and 100 automatically generated by your C++ code.
Requirements:
The user has 7 attempts available to find the number
The game displays clues to help the user guess the number at each attempt (go lower or higher)
Your code should not use functions (to be seen in the next module where you will rewrite this program)
Your code should use at least one control structure
Your code should use a random number generator to generate a new random number to guess for each game
Program presentation and display will be 30% of your grade while functionalities will represent 70%
Submit your code .cpp file and e in pdf file
#include <iostream>
#include <ctime>
using namespace std;
char l;
int main()
{
srand(time(NULL));
int random_num = rand() % 101;
//int guess;
//int attempts = 7;
cout << random_num;
cout << " n Enter a letter to exit." << endl;
cin >> l;
return 0;
}
the another home work is project 7


0 comments