I am trying to make a program that will randomly show the outputs of a coin flipping until there are 5 heads in a row and then the program has to stop. I do not have a lot of experience coding so any help is appreciated! So far all I have is a program that outputs the result of a coin flip one time.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
srand (time(NULL));
int flip = (rand()%2)+ 1 ;
cout<<coin;
return 0;
}