Search........

Google

Thursday, March 6, 2008


/* Here we are going to add two numbers */
using System;


namespace nm1


{


class cl1


{


static void Main()


{


int inum1,inum2,add;


Console.WriteLine("enter a no");


inum1=Convert.ToInt32(Console.ReadLine());


Console.WriteLine("enter a second no.");


inum2=Convert.ToInt32(Console.ReadLine());


add=inum1+inum2;


Console.WriteLine("Result ="+add.ToString());


}


}


}

2 comments:

samyuktha said...

i tried the program it was working fine but the only thing is it was not able to hold the output window when i run the program so in the last line i included console.readline();then it worked fine anyways thanks for u program it was very helpful

Anonymous said...

this is a very good post.Really nice .Thanks for posting