-
October 12th, 2010, 05:38 PM
#1
Console application in a windows form: 10 digit telephone number problem
I am working on this telephone problem and i need serious help. I am new to C# and this is very difficult for me. I would greatly appreciate in-depth help and guidance.
people sometimes give their telephone numbers using one or more alphabetic characters. Write a program that accepts a 10-digit telephone number that may contain one or more alphabetic characters. Display the corresponding number using numberals. The numbers and letters are associated as follows on your telephone.:
ABC:2
DEF:3
GHI:4
JKL:5
MNO:6
PQRS:7
TUV:8
WXYZ:9
if the user enters a character that is not on the telphone as part of the number, display a message indicating that the value does not match a number. Allow both upper- and lowercase characters to be entered.
-
October 12th, 2010, 05:52 PM
#2
Re: Console application in a windows form: 10 digit telephone number problem
The exercies is to help you learn. You will learn nothing if someone else does it for you.
Post some code and someone may help by pointing out where you are going wrong.
Basically you just need to write some code that will compare what the user entered to the valid characters. If they entered A or B then that would be a 1 if they entered a 1 that would be a 1 if they entered a $ display an error message.
Always use [code][/code] tags when posting code.
-
October 12th, 2010, 06:10 PM
#3
Re: Console application in a windows form: 10 digit telephone number problem
You will never pass your class (or become a competent engineer) if you can't put in the effort to learn the basics.
-
October 12th, 2010, 08:14 PM
#4
Re: Console application in a windows form: 10 digit telephone number problem
for the telephone question would i use something like this:
using System;
namespace ConsoleApplication7
{
class Program
{
static void Main()
{
int inner;
for (int outer = 0; outer < 3; outer++)
{
for (inner = 10; inner > 5; inner--)
{
Console.WriteLine("Outer: {0}\tInner:{1}", outer, inner);
}
}
}
}
}
but for numbers and letter???
-
October 12th, 2010, 09:10 PM
#5
Re: Console application in a windows form: 10 digit telephone number problem
Looking for a grade, or just can't resist the urge to be different?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|