MuffinMonster

Class Task 10#

Oct 13th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 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 ConsoleApplication5
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int num1, num2, mahpela, total = 0;
  14.             num1 = int.Parse(Console.ReadLine());
  15.             num2 = int.Parse(Console.ReadLine());
  16.             mahpela = num1 * num2;
  17.             while (mahpela != 0)
  18.             {
  19.                 total = total + mahpela;
  20.                 num1 = int.Parse(Console.ReadLine());
  21.                 num2 = int.Parse(Console.ReadLine());
  22.                 mahpela = num1 * num2;
  23.             }
  24.             Console.WriteLine("Total: " + total);
  25.             Console.ReadKey();
  26.         }
  27.     }
  28. }
Add Comment
Please, Sign In to add comment