Hi, for my assignment I'm trying to output the users requested coin toss amount and then give them the amount of times they flipped heads and tails. I'm having a hard time trying to figure out how I should implement this.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int cointoss (void){
int randomNumber;
randomNumber = 1 + rand() % 2;
return randomNumber;
}
int main(){
int howManyTimes = 0 ;
int randomNumber = 0 ;
int heads = 0 ;
int tails = 0 ;
string headtail = "";
cout << "How many times do you want to toss the coin?\n";
cin >> howManyTimes ;