Ask Experts Questions for FREE Help !
Ask
    Anar22's Avatar
    Anar22 Posts: 26, Reputation: 1
    New Member
     
    #1

    Dec 13, 2011, 07:03 AM
    Write a function c
    Part a:
    write a function named (rollTheDie)
    that does not take any parameter.
    The function should roll a die twice(two times)Each roll will generate a random number between 1
    and 6 inclusive. The function should return 1 if the sum value of the two rolls is 7
    The function should return 0 if the sum value of the two rolls is 11
    If the sum is neither 7 nor 11.
    the function should return 2.

    partb:
    write a main function that calls rollTheDie function and print if the result is 7 or 11 or not 7 or 11
    Anar22's Avatar
    Anar22 Posts: 26, Reputation: 1
    New Member
     
    #2

    Dec 13, 2011, 07:05 AM
    Can any one help me

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

How to write a linear cost function [ 9 Answers ]

If the fixed cost is $4000, and 50 items costs $7000 to produce, what is the linear cost function?

Write a linear cost function, identify all variables [ 1 Answers ]

A parking garage charges 50 cents plus 35 cents per half-hour.

How to write a linear revenue function [ 1 Answers ]

The union charge $2 per raffle ticket. The only expenses the uion will incur are the cost of raffle tickets estimated at $0.60 per ticket and the cost of the Grand Prize,a lap top worth $875. Write: A linera cost function A Linera revenue function

How do write a linear cost function: [ 6 Answers ]

Thirty units cost $1500; 120 units cost $5640 I need to understand step by step how to work this problem

Write structural function [ 1 Answers ]

Write structural function for each of the following : a)three ethers with formula C4H10O b)A secondary alcohol with the formula C3H6O c)Three secondary alkyl halides with the formula C5H11Br d)A tertiary alkyl halide with the formula C5H11Br


View more questions Search