Professional Documents
Culture Documents
Document 1
Document 1
Mini project
On
“ARMSTRONG NUMBER “
Submitted in partial fulfilment of the requirements for the award
Submitted by
Mrs. Geetha R
Assistant Professor
Bengaluru-560004
2023-2024
INTRODUCTION
Rock ,paper ,scissors (commonly scissors, paper, rock or stone in Australia and New
Zealand) is a intransitive hand game usually played between two people, in which each
player simultaneously forms one of three shapes with an outstretched hand. These shapes are
"rock" (a closed fist), "paper" (a flat hand), and "scissors" (a fist with the index finger and
middle finger extended, forming a V). The earliest form of "rock paper scissors"-style game
originated in China and was subsequently imported into Japan, where it reached its modern
standardized form, before being spread throughout the world in the early 20th century. The
program typically starts by displaying a prompt for the user to input their choice (rock, paper,
or scissors). It then generates the computer's choice and compares the two to determine the
winner based on the established rules.
#include<stdio.h>
#include<stdlib.h>
int main()
//0,1,2,,0==Rock,1==Paper,2==Scissor
while(1){
printf ("\n Enter your move: \t 0 For Rock\t 1For Paper \t 2FOr scissors\t 9 to exit");
if(user move==9){
exit(1);
printf("\n The Might computer has bested you! \t Paper Beats Rock");
printf("\n The Might computer has bested you! \t Rock beats scissors");
printf("\n The Might computer has bested you! \t Paper Beats Rock");
printf("\n The Might computer has bested you! \t Scissors beats paper");
}
else if(usermove==2 && computermove==0)
printf("\n The Might computer has bested you! \t Rock beats paper");
printf("\n The Might computer has bested you! \t Scissor beats paper");
else{
}
Output
What is the benefit of rock , paper , scissors ?
Implementing Rock, Paper, Scissors in C is an engaging coding exercise that not only
fortifies fundamental programming skills like working with conditionals and
randomization but also fosters a deeper understanding of algorithmic thinking. This
practical project enhances the coder's ability to handle user interactions, making it a
valuable and enjoyable learning experience. It provides a practical and fun way to
practice these skills while creating an interactive game. Additionally, it allows you to
explore concepts like loops for replay ability and functions for modular code.
Conclusion