Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ClassesBitch
- {
- class Program
- {
- static void Main(string[] args)
- {
- //THIS IS THE OUTPUT, WHEN I HAVE THE Console.WriteLine outside of the while loop
- // Hellooo...
- // Hellooo...
- // Hellooo...
- // Hellooo...
- // and this is the output i get when i have the Console.WriteLine inside of the while loop
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- // Helloooo...
- string result = "";
- Echo e1 = new Echo();
- Echo e2 = new Echo();
- int x = 0;
- while (x < 5)
- {
- result = result + e1.Hello() + "\n";
- e1.count=e1.count+1;
- if (x < 5) { e2.count = e2.count + 1; }
- if (x == 4) { e2.count = e2.count + e1.count; }
- x = x + 1;
- Console.WriteLine(result);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement