CLASS 1: How To Add Two Integers Using C# In Visual Studio - MeraForum Community.No 1 Pakistani Forum Community

MeraForum Community.No 1 Pakistani Forum Community

link| link| link
MeraForum Community.No 1 Pakistani Forum Community » The World of Information » Computer and Information Technology » C# » CLASS 1: How To Add Two Integers Using C# In Visual Studio
C# C# Sharp Lectures & Tutorials

Advertisement
 
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
(#1)
Old
Morash's Avatar
Morash Morash is offline
 


Posts: 17,781
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2010
Location: ▌║█║▌│█│║▌║
Gender: Male
?? CLASS 1: How To Add Two Integers Using C# In Visual Studio - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   03-21-2014, 12:15 AM




The Motive Of This Tutorial Is Just To Learn How To Type C# Code Using Visual Studio, How To Debug(Compile) And Run It.
This Is A Simple C# Program Which Is About Adding Two Integers Type Values. We Take Input Values From The User And Display It On The Screen. Follow Below;




Open Microsoft Visual Studio 2013








Create A New Project - Shortcut Key CTRL+SHIFT+N









Click On Visual C# And Select Console Application









Default Class, Function & Library Files Come Itself When A Project Is Created









Code For Adding Two Integers From The User Inside Main



information

Information

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleAddition
{
class Program
{
static void Main(string[] args)
{
int first, second, result;
Console.Write("\nEnter First Value : ");
first = int.Parse(Console.ReadLine());
Console.Write("\nEnter Second Value : ");
second = int.Parse(Console.ReadLine());
result = first + second;
Console.WriteLine("\n\t "+first);
Console.WriteLine("\t+ " + second);
Console.WriteLine("\t------");
Console.WriteLine("\t " + result);

Console.ReadKey();
}
}
}










Click Debug & Select Start Debugging To Compile & Execute The Code









Enter Two Values To Add








Output




 





bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт;
with excellence.
pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร

.. нoolιgan

Last edited by Morash; 04-07-2014 at 11:27 PM.. Reason: Title Updated
Reply With Quote Share on facebook
Sponsored Links
 

Bookmarks

Tags
add, class, integers, studio, visual


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Your Own Calculator Tutorial Part 1 - C Sharp Visual Studio 2008 ♥☆∂яєαмιηg яσѕє♪ Tutorials 2 09-03-2013 03:26 PM
Create Your Own Calculator Tutorial Part 2 - C Sharp Visual Studio 2008 ♥☆∂яєαмιηg яσѕє♪ Tutorials 1 08-30-2012 12:41 AM
Visual Studio Database Application - Part 1 ♥☆∂яєαмιηg яσѕє♪ Tutorials 1 08-30-2012 12:40 AM


All times are GMT +5. The time now is 05:46 AM.
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.

All the logos and copyrights are the property of their respective owners. All stuff found on this site is posted by members / users and displayed here as they are believed to be in the "public domain". If you are the rightful owner of any content posted here, and object to them being displayed, please contact us and it will be removed promptly.

Nav Item BG