Buy Questpond's video subscriptions on
huge discount
.
Online: 3989
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Codes
>
Loading ...
Get greater number in runtime..
Posted by
NIITSANJEEV
under
C#
category on
2/21/2012
|
Points: 40
| Views : 1972
Post Code
|
Search Codes
|
Code Home
using System;
class perfect
{
public static void Main()
{
Console.WriteLine("Enter First number");
int num1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Second number");
int num2 = Convert.ToInt32(Console.ReadLine());
{
if (num1 > num2)
{
Console.WriteLine("A is greater");
}
else
{
Console.WriteLine("B is greater");
}
}
}
}
Alert Moderator
Bookmark It
Comments or Responses
Posted by:
T.Saravanan
on: 2/21/2012 Level:
Silver
| Status:
[Member]
[MVP]
|
Points: 10
Kindly post your code inside the code tag.
I have one question from your code.If I am using same "value" in both num1 and num2 means which is return from your code.
For example --> num1 = 10; num2 = 10;
Just for fun. Kindly check and change it.
Posted by:
Omniitstudent
on: 2/21/2012 Level:
Starter
| Status:
[Member]
|
Points: 10
using System;
class perfect
{
public static void Main()
{
Console.WriteLine("Enter First number");
int num1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Second number");
int num2 = Convert.ToInt32(Console.ReadLine());
if (num1>num2)
{
Console.WriteLine("num1 is greater ");
}
else if (num2>num1)
{
Console.WriteLine("num2 is greater ");
}
else
{
Console.WriteLine("both are equals ");
}
Console.ReadLine();
}
}
crazy code..
Login to post response
Latest Code Snipptes
Uber Clone - Taxi Booking App
writing Custom pagination html code in python and django
Code snippet for setInterval
Azure Function - Connect to MS Dynamics using application user - .NET core 3.1
MS Dynamics 365- Custom action - Read input parameter values from plugin
MS Dynamics 365- Disassociate record from N-N relationship entity
Search box with icon in Navbar in bootstrap 4
Remove HTML tags using Regular Expression in C#
MS Dynamics 365- Close Quote from C# / Custom action
More ...