المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Help with C#



C# Programming
03-12-2010, 03:50 PM
I am having some problem with my c# program. The program was meant to ask a user for their age and a pin code, if the user is over 18, it ask them for their pin code and how many times they want their name displayed btw 5 and 20 but if they are not, a particular message comes up.

I am having problem setting up the variables. Do I have to store the age, pincode and numbers in int ?

This is what I have done so far and i have tried entering a wrong pin code but it didn;'t give me the messages i wanted.

class Program
{
static void Main(string[] args)
{
int age;
long pinCode;
int number;



age = 18;
pinCode = 1965;
number = 5;

What am I doing wrong?