Predict the output of the following code snippet:
using System;
class Myclass
{
static void Main()
{
string Answer="Y";
string Response_Code="66";
int Counter=60;
Console.writeLine(Answer);
Console.WriteLine("Response Code");
Console.WriteLine(Cunter);
Console.ReadLine();
}
}
2. Jim is developing software for automating the slot
booking process for a video game parlor. Customers fill the Booking Request
form with the details of the game, such as the name, number of players, and
complexity level. They hand over the form to the booking officer at the parlor.
Depending on the availability, the booking officer reserves the time slots and
the play station for customers.
using system ;
public class gamedetials
{
string fname ;
string lname ;
int noofplayer ;
int level ;
public static
void getGameDetail ()
{
console.writeline (" enter your first name" );
fname=
console.readline();
console.
writeline ( " enter your last name" );
Lname-console.readline();
console.writeline( "enter no of players");
nooFplayer=convert ToInt32(console. readline() )
console.
writeline(" entercomplexity level number:");
level= convert
ToInt32(console.readline());
Console.ReadLine();
}
public static void showGameDetails()
{
{
console.
writeline("the details enter are as follows:");
console.
write("first name:");
console.writeline(fname);
console.write("last name:");
console.writeline(lname);
console.write("no
of players:");
console.writeline(noofplayers);
console.write("level:");
console.writeline(level);
public static void Main(string []args)
{
GameDetails gd=new
GameDetails();
gd.getGameDetials();
gd.showGameDetails();
}
}
No comments:
Post a Comment