generate functionMon, 01 May 2023

juego de piedra papel y tijeras con 110 lineas de codijo usando switch, printf y scanf

#include <iostream> #include <stdio.h> using namespace std; int main() { int playerOneChoice; int playerTwoChoice; char playerOneName[50]; char playerTwoName[50]; cout << "Player 1 What is your name?" << endl; cin >> playerOneName; cout << "Player 2 What is your name?" << endl; cin >> playerTwoName; cout << "What is your choice " << playerOneName << " ?" << endl; cin >> playerOneChoice; cout << "What is your choice " << playerTwoName << " ?" << endl; cin >> playerTwoChoice; switch (playerOneChoice) { case 1: if (playerTwoChoice == 2) { cout << playerOneName << " Loose" << " and " << playerTwoName << " Wins" << endl; } else if (playerTwoChoice == 3) { cout << playerOneName << " Wins

Want to kickstart your project?Use the new AI Studio to create your code