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

  Implement the guess the word

Implement  the ‘Guess the Word' game in an object-oriented manner

  Write a program that ask a user to enter a list of names

Write a program that ask a user to enter a list of names. When you finish, The program will show the total number of characters in all the names.

  Define an integer array with five entries

In the main function, define an integer array with five entries and assign values to the entries. Display the entries in the order in which they occur within the array.

  Write a function to calculate tax

write a function to calculate tax, the sample output is : Filing Status (1) Single (2) Married (3) Head of Household (0)

  Object-oriented programming with vcl form

I need someone to help in my project which is windows application program. It supposed to be in program Object-Oriented Programming in C++ with VCL form.

  Write a program that reads letters from a file

This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.

  Write a function named fact

Write a function named "fact" that takes one integer arguments,call them "num" and returns as its values the factorial number

  Ruby implement primitive types

How does Ruby implement primitive types, such as those for integer and floating-point data?  3-What is the single most important practical difference between Smalltalk and C++?

  Write a c program that copies the contents of one file

write a c program that copiest the contents of one file to a destination file. This program works by first prompting the user for the name of the source file and destination file.

  Explain function which builds the multi-dimensional vector

A separate function which outputs the multi-dimensional vector to the screen.

  Give a pseudo code for the script logic.

Update the given script for above requirements, and also give a pseudo code for the script logic.

  Write a function named totamt

Write a function named totamt() that uses four parameters named quarters, dimes, nickels, and pennies, which represent the number of each of these coins in a piggybank.

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