Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   Add two number in C#...... (http://www.go4expert.com/forums/add-c-sharp-t25858/)

Patel 22May2011 09:48

Add two number in C#......
 
Code:

using System;
using System.Collections.Generic;
using System.Text;

namespace add_num
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the num");
            int a, b,c;
            Console.WriteLine("Enter the first no. :");
            a = Int32.Parse(Console.ReadLine());
            Console.WriteLine("Enter the second no :");
            b = Int32.Parse(Console.ReadLine());
            c = a + b;
            Console.WriteLine("total :" + c);
            Console.ReadLine();

        }
    }
}


Patel 22May2011 09:55

Re: Add two number in C#......
 
If you don't understand in this program you can ask the question.

shabbir 22May2011 10:01

Re: Add two number in C#......
 
Make use of Code Blocks when you have code in the post


All times are GMT +5.5. The time now is 09:41.