Pages

💡 Now You Can Get your Assignments Sollution here... .💡 100% plagiarism Free Service...💡 Responsibility, punctuality and on-time delivery... 💡 Furnishing you with experts... 💡 experienced in your subject 100% privacy... 💡 helping you with the highest efficiency , professionalism Affordable and budget-friendly costs that do not make a hole in your wallet

C++ Code for My Grand-maa trunk Game

#include <iostream>
#include<string>
void input(char[]);
void arrconca(char[],char[]);
void output(char[]);
#include<windows.h>
int i=0;
using namespace std;
void main()
{
system("color 3");
char array[5000]={"In my Grandmaa trunk, I packed "};
char array1[20]={'\0'};
for(i=0;i<10;i++)
{
cout<<"Player "<<i<<":";
input(array1);
arrconca(array,array1);
output(array);
cout<<"\n";
}
}
void input(char array1[])
{
cin.getline(array1,20,'\n');
}
void arrconca(char array[],char array1[])
{
system("color 4");
char temp[11]={" and the "};
if(i==0)
strcat(array,array1);
if(i!=0)
{
strcat(array,temp);
strcat(array,array1);
}
}
void output(char array[])
{
system("color 2");
int y=strlen(array);
for(int i=0;i<y;i++)
cout<<array[i];
}

No comments: