Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace combination_Of_3_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine(" Pick 3 numbers between 0 - 9 ");
- int num1;
- int num2;
- int num3;
- string sum1;
- string sum2;
- string sum3;
- string sum4;
- string sum5;
- string sum6;
- Console.WriteLine(" Insert the first number: ");
- num1 = int.Parse(Console.ReadLine());
- Console.WriteLine(" Insert the second number: ");
- num2 = int.Parse(Console.ReadLine());
- Console.WriteLine(" Insert the third number: ");
- num3 = int.Parse(Console.ReadLine());
- sum1 = num1 + " " + num2 + " " + num3 ;
- sum2 = num1 + " " + num3 + " " + num2;
- sum3 = num2 + " " + num1 + " " + num3;
- sum4 = num2 + " " + num3 + " " + num1;
- sum5 = num3 + " " + num1 + " " + num2;
- sum6 = num3 + " " + num2 + " " + num1;
- Console.WriteLine(" The First combination Is: " + sum1);
- Console.WriteLine(" The Second Combination Is: " + sum2);
- Console.WriteLine(" The Third Combination Is: " + sum3);
- Console.WriteLine(" The Fourth Combination Is: " + sum4);
- Console.WriteLine(" The Fifth Combination Is: " + sum5);
- Console.WriteLine(" The Sixth Combination Is: " + sum6);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement