# I need help with wriiting this C++ program this a program that simulates flipping a coin and rolling a dice.

Write a program that simulates fipping a coin and rolling a dice.A user will input their choice oF fipping a coin (C), rolling a dice (D), or exiTng (E).IF the user chooses a coin toss, the program will ask how many Tmes the coin should be tossed,and then will simulate tossing the coin that many Tmes and print the result to the user.IF the user chooses rolling a die, the program will ask how many sides the die has and how manyTmes it should be rolled.±he program will then simulate rolling a die (with the number oF sidesspeci²ed) that many Tmes.±he program will conTnue unTl the user presses E.This should be a lot of fun!Here are some great things to think about as you begin your program!You will need two FuncTons.A string fipCoin()and aint rollDice(int)FuncTon.±hese FuncTonswill generate a random number. ³or the coin fip, the random number should be in the range oF1 to 2. IF the number is 1, the FuncTon should returnheads.IF the random number is 2, theFuncTon should returntails.³or the roll dice FuncTon, the random number should be in therange oF 1 to the number oF sides. ±he FuncTon should return the result oF the die roll.Important notes: You will want to seed your random number generator. ±o do this at thebeginning oF your program #include <cTme>.Use the Following commands to seed the random number generator.//Get the system Tme to use it to seed the random number generatorunsignedseed = Tme(0);//seed the random number generatorsrand(seed);±o get a random number between 1 and 2, use the Following code:inttoss = 1 + rand() % 2;.Sample Output from the ProgramWelcome to the random value generator!Would you like to fip a coin (C), roll a die (D), or exit (E)? CHow many Tmes do you want to fip the coin? 5³lip 1 : tails³lip 2 : heads³lip 3 : heads³lip 4 : heads³lip 5 : tails