0% found this document useful (0 votes)
7 views1 page

Simple Four Digits Game Code

This C# program is a simple four digit guessing game that prompts the user to enter four values and performs calculations on each value to derive a fifth value. It then displays and sums all five values to prove that the calculations were performed correctly.

Uploaded by

fatimafati syed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Simple Four Digits Game Code

This C# program is a simple four digit guessing game that prompts the user to enter four values and performs calculations on each value to derive a fifth value. It then displays and sums all five values to prove that the calculations were performed correctly.

Uploaded by

fatimafati syed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SIMPLE FOUR DIGITS GAME

namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
[Link] = [Link];
[Link]();
[Link]("A SIMPLE GAME");
[Link]("ENTER A FOUR DIGITS VALUE");
[Link]("Enter 1st value ");
int value1 = [Link]([Link]());
int result = (value1 + 20000) - 2;
[Link]("Answer will be this " + result);
[Link]("Enter second value ");
int value2 = [Link]([Link]());
int value3 = 9999 - value2;
[Link]("Third value is this " + value3);
[Link]("Now enter fourth value ");
int value4 = [Link]([Link]());
int value5 = 9999 - value4;
[Link]("Fifth value is this " + value5);
[Link]("The sum of all five values is this; Hence proved:" +
Convert.ToInt32(value1 + value2 + value3 + value4 + value5));
[Link]();

}
}
}

You might also like