#include <iostream>
#include <ctime>
#include <conio.h>
using namespace std;
bool player_won (int player, int computer)
{
switch (player)
{
case 1:
if (computer==2)
return false;
else return true;
case 2:
if (computer==3)
return false;
else return true;
case 3:
if (computer==1)
return false;
else return true;
}
}
main ()
{
cout<<"Rock, paper scissors by TheMaster999"<<endl;
srand (time(NULL));
while (true)
{
int computer=rand()%3+1;
int player;
cout<<"If u choose rock type 1, if u choose paper type 2, if u choose scissors type 3"<<endl;
cin>>player;
if (player==computer)
cout<<"Draw, play again"<<endl;
else if (player_won(player,computer))
{
cout<<"Congratulations, you won!"<<endl;
break;
}
else
{
cout<<"You lost :("<<endl;
break;
}
}
cout<<"Thank you, for playing my game"<<endl;
getch();
return 0;
}
A table. Hope this helps friend
Answer:
#include <iostream>
using namespace std;
void matrix(){
int row = 5, col = 6;
int myarr[row][col];
for (int i = 0; i < 5; i++){
for (int x = 0; x < 6; x++){
if (i == 0){
myarr[i][x] = (x+1)*(x+1);
}else if ( x == 0){
myarr[i][x] = (i+1)*(i+1)*(i+1);
} else if ( i == x){
myarr[i][x] = (i+1);
} else{
myarr[i][x] = myarr[i-1][x] + myarr[i][x-1];
}
}
}
for (int i = 0; i < 5; i++){
for (int x = 0; x < 6; x++){
cout<< myarr[i][x] << " ";
}
cout<< "\n";
}
}
int main(){
matrix();
}
Explanation:
The C++ source code defines a two-dimensional array that has a fixed row and column length. The array is a local variable of the function "matrix" and the void function is called in the main program to output the items of the array.
1-A database is an organized collection of data, generally stored and accessed electronically from a computer system (2 choice)
2 - All of the above
3-record
4- B i think
I hope this helped. :D
Answer:
True
Explanation:
a lot of people use this as a way to keep things nice and safe, but sometimes thinks don’t go as planned. Don’t really know how else to answer this lol