using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class WasteSchedul
{
public void start()
{
int choice = -1;
while (choice != 0)
{
WriteMenuText();
choice = int.Parse(Console.ReadLine());
switch (choice)
{
case 1:
{
Bin1();
break;
}
case 2:
{
Bin2();
break;
}
}
}
}
public void WriteMenuText()
{
Console.WriteLine("\n1 Bin 1");
Console.WriteLine("2 Bin 2 ");
Console.WriteLine("0 Exit the program");
Console.Write("\nYour choice ");
}
private void Bin1()
{
int count = 52;
int p = 0;
const int cols = 3;
string montera = "";
for (int i = 1; i <= count; i += 2)
{
montera += string.Format("{0,10} {1,2}", "Week", i);
p++;
if ((p >= cols) && (p % cols == 0))
{
Console.WriteLine(montera);
montera = "";
}
}
Console.WriteLine(montera);
Console.WriteLine("\nBin number 1 is emptied the following weeks ");
Console.WriteLine("-------------------------------------------------------");
Console.ReadLine();
}
private void Bin2()
{
int count = 52;
int p = 0;
const int cols = 3;
string montera = "";
for (int i = 5; i <= count; i += 6)
{
montera += string.Format("{0,10} {1,2}", "Week", i);
p++;
if ((p >= cols) && (p % cols == 0))
{
Console.WriteLine(montera);
montera = "";
}
}
Console.WriteLine(montera);
Console.WriteLine("\nBin number 2 is emptied the following weeks ");
Console.WriteLine("-------------------------------------------------------");
Console.ReadLine();
}
}
}
i need to het a return in to this. When i type in 1 after it i want the menu to come up but how do i do it? and how do you du so it is \n between your choice and the week?
sorry im so tired maybe that's way i cant see it:P