using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO; //first step add this
namespace Project4
{
class Program
{
static void Main(string[] args)
{
Random random = new Random();
{
int m = 0, j = 0, k = 0;
Console.WriteLine("Enter Statet(m or j or k)");
String state = Console.ReadLine();
{
m = random.Next(1,20);
Console.WriteLine(m + "\t" + m);
}
if (state == "m")
{
m = m + 1;
}
if (state == "j")
{
j = j + 1;
}
else
{
if (state == "k")
k = k + 1;
}
Console.WriteLine("The number of m is" + m);
Console.WriteLine("The number of j is" + j);
TextWriter frenchtoast = new StreamWriter("state.txt");
frenchtoast.WriteLine(DateTime.Now);
int rno = Convert.ToInt16(Console.ReadLine());
switch (rno)
{
case 1:
Console.WriteLine("California");
break;
case 2:
Console.WriteLine("Ohio");
break;
case 3:
Console.WriteLine("North Carolina");
break;
}
} string dummy = Console.ReadLine();
}
}
}
Davenavie 0 Newbie Poster
Davenavie 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.