Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jan 10th, 2007, 11:56 PM   #1
Mixmaster
Newbie
 
Mixmaster's Avatar
 
Join Date: Sep 2006
Posts: 8
Rep Power: 0 Mixmaster is on a distinguished road
School days drama

Im doing an assignment in my C# class. The idea is to make a program to takes a month ( ie 05) day ( 1-31) century ( ie 20) year (ie 07) .

It takes the date and shows what day of the week that is.

Im doing it section by section, and im stuck on the first section.

Here's how my working code is looking so far:
using System;


public class ddate
{
	
	
	public static void Main(string[] args)
	{
		/* This program will accept a date from the user
			 * and display the day of the week.
			 */
			
		//a user is inputing numbers and I can use int 
		// to verify that.  

		string month , day , century, year ; //strings will convert to int 

		Console.WriteLine("I am going to ask you a series of questions. Press enter to continue");
		Console.ReadLine();
		Console.WriteLine("This is newb code. Enter values exactly as directed. Press enter to continue");
		Console.ReadLine();      
			
                    /*Basically the program starts here.  I just need some solid
                         ways to check if the user does it right. Suggestions? */


		Console.WriteLine("Enter a two digit month. ie 08 for August");
		month = Console.ReadLine();
		Convert.ToInt32(month); 

		Console.WriteLine("Enter a day. 1 - 31 PLEASE!");
		day = Console.ReadLine(); 
		Convert.ToInt32(day);

		Console.WriteLine("Enter the century. ie the '18' in 1870. TWO DIGITS");
		century = Console.ReadLine();
		Convert.ToInt32(century);

		Console.WriteLine("Finally enter the two digit year. ie the '70' in 1870. TWO DIGITS") ;
		year = Console.ReadLine();
		Convert.ToInt32(year);

		




		   
		
}

	}

Last edited by Mixmaster; Jan 11th, 2007 at 12:01 AM. Reason: incorrect class name
Mixmaster is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Military School Indigno Coder's Corner Lounge 8 Dec 28th, 2006 1:58 AM
caluculate day of week given present date and number of days srinivasc_it C++ 4 Nov 4th, 2006 5:54 AM
School Project (Need Help) Digit Visual Basic 9 Apr 28th, 2006 6:20 AM
Help finding a Server for school bigguy Coder's Corner Lounge 6 Mar 17th, 2006 11:07 PM
School Days Ancient Dragon Coder's Corner Lounge 7 Aug 3rd, 2005 2:04 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:36 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC