Explain the rand() in detail with example

Assignment Help C/C++ Programming
Reference no: EM13938860

We have to use rand() to get 2 numbers in random each time and ask student to find the correct solution.. First we start with numbers 1 to 6.If we get 4 and 5 then the program will ask "how much is 4 times 5 4x5 = " Then the student will be able to give the answer, If it is correct then it will be typped on screen "Correct" othewise "wrong" The student would be able to repeat it for 10 times until he finds the correct answer, If he fails then it will appeared on screen "You have to remember that 4 times 5 is 20!"

i)We have to use rand() also for 4 choices when the student give a correct answer "Very good, Congratulation, Bravo, Correct"
Also we use rand() for wrong answer "wrong, try again, give another answer, surly you know it try again"

ii) if the percentage of the correct answers is 75% of the 10 questions, then it will take us to the next level from 7 to 9. it continues to next level from 10 to 60 and thne next level from 70 to 90.

iii) The student should be able to test himself in addition, substraction, multiplication, divission giving integer (we use possitive numbers)

Reference no: EM13938860

Questions Cloud

Negotiate to undertake a competency assessment : Write a discussion paper identifying strategies used to assess knowledge and competence in the workplace and the principles and challenges associated with giving feedback to staff after assessments.
Determinant of a person satisfaction at work : What do you think is the role of money as a determinant of a person's satisfaction at work and with life in general? Should organizations worry about this issue? Explain
Determine the amount of sales revenue mccarty : Determine the amount of sales revenue McCarty will report on the first 2012 quarterly pro forma income statement.
Determine whether each item is included as part of the cost : Determine whether each item is included as part of the cost of property, plant, and equipment. For any item excluded from the cost of property, plant, and equipment, explain why the item was excluded.
Explain the rand() in detail with example : The student should be able to test himself in addition, substraction, multiplication, divission giving integer (we use possitive numbers)
What is the current share price : Bayou Okra Farms just paid a dividend of $2.65 on its stock. The growth rate in dividends is expected to be a constant 4.5 percent per year indefinitely. Investors require a return of 15 percent for the first three years, a return of 13 percent for t..
Compute the cost of the new dry cleaning machine : Compute the cost of the new dry cleaning machine. Explain why you excluded any expenditures from the cost of the dry cleaning machine.
Calculating irr : Calculating IRR: Compute the Internal rate of return for the cash flow of the following two projects:
For each of your issues, provide an example : For each of your issues, provide an example of a company or industry where these issues could be present.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Object oriented app development

Object Oriented App development

  Program - cosc

Assignment is based on Programming Exercise - The input file has the needed data on a single line. There is text as well as the numerical inputs.

  Write a program to calculate the trajectory flight path of

write a program to calculate the trajectory flight path of a soccer ball when it is kicked by a player inside the field

  Create valle products accdb database file

Create a new table named Orders using the table design below. You may create your table in design view or datasheet view. Save the Orders table as Orders Your Name. Define a one-to-many relationship between the Customer table and Orders table. Ri..

  Design and implement a class called bus

Define the Bus constructor to accept and initialize all instance data. Include getter and setter methods for all instance data.

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Write a program to find the area of a circle

Write a program to find the area of a circle. The program should use two procedures. The first procedure will print out the program heading and ask the user to enter the radius.

  Load in the household configuration file

The first thing the program is required to do is load in the household configuration file, with the following  filename: housecfg.dat

  Write a program to calculate the volume flow rate

Write a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second.

  Write a program that uses 3 input files and 3 output files

write a program that uses 3 input files and 3 output files.

  Define a class for a type called fraction

Define a class for a type called Fraction. This class is used to represent a ratio of two integers. Include mutator functions that allow the user to set the numerator and the denominator.

  Construct vector and linked lists data structures

You will prepare sorted versions of the Linked Lists and Vector data structures developed in class

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd