Venciity

[Jumpstart C#] Conditional statements - multiple or not

Jan 22nd, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Conditional_Statements_Homework___jumpstart__
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.Write("number1= ");
  14.             int num1 = Int32.Parse(Console.ReadLine());
  15.             Console.Write("number2= ");
  16.             int num2 = Int32.Parse(Console.ReadLine());
  17.  
  18.             if (num1 % num2 == 0)
  19.             {
  20.                 Console.WriteLine("{0} is a multiple {1}",num1,num2);
  21.             }
  22.             else
  23.             {
  24.                 Console.WriteLine("{0} is not a multiple {1}",num1,num2);
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment