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