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| link| link| link| link| link| link| link| link| link| link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | 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
 
Post New Thread  Reply
 
Thread Tools Display Modes
(#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, 01: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-08-2014 at 12:27 AM.. Reason: Title Updated
Reply With Quote Share on facebook
Sponsored Links
(#2)
Old
QUEEN OF HEARTS ...'s Avatar
QUEEN OF HEARTS ... QUEEN OF HEARTS ... is offline
... Deserve Only The Best
 


Posts: 13,921
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: ★ Down In The Hell, Up In Da Sky, In Everyone's Heart But Still Invisible ! ★
Gender: Female
Default Re: 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, 01:36 AM

Thanks for sharin ..

 



(#3)
Old
AYAZ's Avatar
AYAZ AYAZ is offline
 


Posts: 12,370
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: Karachi
Gender: Male
Default Re: 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, 02:00 AM

WOw thanks bro for such a wonderful tutorial. I came to know a lot from this. Will definately try.

 







ALLAH FARMATA HAI :
AEY BANDEY JO HUA
WO ACHA HUA .
JO HORAHA HAI ACHA HO RAHA HAI.
JO HOGA WO BHI ACHA HOGA.
TERA KIYA GAIYA JO TU ROTA HAI
TU KIA LAYA JO TU NE KHO DIYA.
JO LIYA YAHIN (DUNYA) SEI LIYA
JO DIYA YAHIN (DUNYA) PE DIYA
JO AAJ TERA HAI PEHLAY KISI AUR KA THA
AUR KAL KISI AUR KA HOGA.
TABDEELI KAINAAT KA MAMOOL HAI
BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI
YANI NAIK AMAAL.


(#4)
Old
nehastar1 nehastar1 is offline
 


Posts: 2,315
My Photos: ()
Country:
Join Date: Jul 2013
Location: Canada
Gender: Female
Default Re: 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, 10:07 AM

thanks for sharing

 



(#5)
Old
Morash's Avatar
Morash Morash is offline
 


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

Thank You All ..

 





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
(#6)
Old
AYAZ's Avatar
AYAZ AYAZ is offline
 


Posts: 12,370
My Photos: ()
Country:
Star Sign:
Join Date: Aug 2008
Location: Karachi
Gender: Male
Default Re: How To Add Two Integers Using C# In Visual Studio - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   03-24-2014, 07:46 PM

Quote:
Originally Posted by Morash View Post
Thank You All ..
Morash , parse ki command input leney ka kaam karti hei ais mei? like jesyy simple C language mei scanf input leney ka kaam karti hie from user?

 







ALLAH FARMATA HAI :
AEY BANDEY JO HUA
WO ACHA HUA .
JO HORAHA HAI ACHA HO RAHA HAI.
JO HOGA WO BHI ACHA HOGA.
TERA KIYA GAIYA JO TU ROTA HAI
TU KIA LAYA JO TU NE KHO DIYA.
JO LIYA YAHIN (DUNYA) SEI LIYA
JO DIYA YAHIN (DUNYA) PE DIYA
JO AAJ TERA HAI PEHLAY KISI AUR KA THA
AUR KAL KISI AUR KA HOGA.
TABDEELI KAINAAT KA MAMOOL HAI
BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI
YANI NAIK AMAAL.


(#7)
Old
Princess Urwa Princess Urwa is offline
 


Posts: 8,345
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2013
Gender: Female
Default Re: How To Add Two Integers Using C# In Visual Studio - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   03-24-2014, 10:57 PM

thanks for sharing

 



[SIGPIC][/SIGPIC]
(#8)
Old
Morash's Avatar
Morash Morash is offline
 


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

Quote:
Originally Posted by AYAZ View Post
Morash , parse ki command input leney ka kaam karti hei ais mei? like jesyy simple C language mei scanf input leney ka kaam karti hie from user?
int.Parse Ki Command Hum String Type Variable Ko Int Mai Convert Karne K Liye Use Karte Hai ..
Aur User Se Input Lene K Liye Hum Console.ReadLine() Use Karte Hai ..

 





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
Post New Thread  Reply

Bookmarks

Tags
add, class, integers, studio, visual

« Previous Thread | Next Thread »
Thread Tools
Display Modes

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 04:26 PM
Create Your Own Calculator Tutorial Part 2 - C Sharp Visual Studio 2008 ♥☆∂яєαмιηg яσѕє♪ Tutorials 1 08-30-2012 01:41 AM
Visual Studio Database Application - Part 1 ♥☆∂яєαмιηg яσѕє♪ Tutorials 1 08-30-2012 01:40 AM


All times are GMT +5. The time now is 11:19 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