NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Arizona State University
NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Question 1 1 / 1 pts I have read the ASU ā¦
Week 4 Lab
CIS170c
DeVry University
#include < iostream >
#include < string > #include < ctime > using namespace std;
//function protoype string flipCoin(); int rollDice(int sides);
int main()
{
char choice = **;
//seed the random number generator time_t time(0); srand(seed);
cout << “welcome to our coin toss and dice rolling program'; <<end1; While(choice != ‘E’) ;
{
cout << “what would you like to choose flip coin(C), roll a dice (D), or exit (E)"; cin » choice;
if (choice == ‘C’ || choice == ‘c’)
{
cout << “how many times do you wan to flip a coin: “; cin » numtoss;
for (int i = 0; i < numtoss; i++)
{ cout << “flip " << i << " is " << flipcoin() << end1; }
}
}
if (choice == ‘D’ || choice == ’d')
{
}
else
{
cout << “Thanks for playing!";
}
}
system(“pause”) ; return 0; string flipCoin()
{ int toss = 1 + rand() % 2; if (toss == 1)
{
return “heads”;
}
else
{ return “tails”;
}
}
NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Question 1 1 / 1 pts I have read the ASU ā¦
HEP 456 Module 5 Section 12 and 13 Planning for Analysis and Interpretation and Gantt chartĀ Name HEP 456: ā¦
HEP 456 Module 6 Section 14 Communication and Dissemination of The Findings HEP 456: Health Promotion Program ā¦