Now I think it's kinda interesting.

Source: Internet
Author: User

The first two days have just been in touch with programming, using C #. The beginning is really boring, but today's feeling is much better, very interesting. According to the teacher's curriculum, he wrote a small program, running well. Share it here.

About the Scheduling applet:

int SJ;
int AA;
String Noon;
String JG;

Console.WriteLine ("I Am a Time helper");
Console.WriteLine ("Current time is:");
SJ = Convert.ToInt32 (Console.ReadLine ());
Noon = SJ > +0 && SJ <= 12? "AM": (SJ > && sj <= 23?) "PM": "Time input Error!!!" ");
AA = SJ <= && SJ >= 0? sj:sj-12;

JG = SJ >= 0 && SJ <= 8? "Go to sleep for a while, the sky is not bright yet!" ": (SJ > 8 && SJ <= 11?") Take a rest after breakfast and exercise! ": (SJ > && SJ <= 15?") You can take a nap after noon. ": (SJ > <= && SJ 18?") Dinner's about to start. ": (SJ > <= && SJ 21? "Sleep Now": (SJ > && sj <= 23?) "It's too late to go to bed." ":" The time is wrong!!! ")))));

Console.Write (AA);
Console.WriteLine (noon);

Console.WriteLine (JG);

A small program of computer questions:

Console.Write ("Hello Friend, what do you need?" ");
Console.Write ("I:");
String a = Console.ReadLine ();
Console.Write ("Oh oh, this ah, we have a lot of shops, how much do you need?") ");
Console.Write ("I:");
String B = Console.ReadLine ();
Console.Write ("OK, this is your {1} {0}.") ", A, b);

Now I think it's kinda interesting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.