daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jan 29th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace _07.Cake_Ingredients
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.            
  10.             int count = 0;
  11.  
  12.             while (true)
  13.             {
  14.                 string ingredient = Console.ReadLine();
  15.                 if (ingredient.Equals("Bake!"))
  16.                 {
  17.                     Console.WriteLine($"Preparing cake with {count} ingredients.");
  18.                     break;
  19.                 }
  20.                 else
  21.                 {
  22.                     Console.WriteLine($"Adding ingredient {ingredient}.");
  23.                     count++;
  24.                    
  25.                 }
  26.                
  27.                                
  28.                
  29.             }
  30.         }
  31.     }
  32. }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top