Category Archives: Problem Solving

A+B Problem

Problem Calculate the result of a + b Input: a and b Output: result of addition of a and b i.e. a+b Solution using System; namespace ProblemSolving { class Program { static void Main(string[] args) { Console.WriteLine(“Enter Your Inpur”); string[] input = Console.ReadLine().Split(‘ ‘); Console.WriteLine(“The result is: ” + (int.Parse(input[0]) + int.Parse(input[1]))); Console.ReadKey(); } }… Read More »

Project Euler Solution – 03

Problem The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? What is Prime Number? Prime Number is a Natural number »    That can only be divided by 1 or by itself e.g. 2/1=2, 2/2=1, 3/1=3, 3/3=1 (they can’t be divided by other… Read More »