Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- // Write a program that finds the biggest of three integers using nested if statements.
- class FindTheBiggest
- {
- static void Main(string[] args)
- {
- int firstNum = int.Parse(Console.ReadLine());
- int secNum = int.Parse(Console.ReadLine());
- int thirdNum = int.Parse(Console.ReadLine());
- int biggest = secNum;
- if (firstNum > secNum)
- {
- biggest = firstNum;
- }
- if (thirdNum > biggest)
- {
- biggest = thirdNum;
- }
- Console.WriteLine(biggest);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement