。 NET Beginner

Source: Internet
Author: User


This week is mainly a brief introduction to the basics of. NET syntax and some job exercises, most of which are related to the C language. At first there are grammatical differences, writing code to have difficulty, logic a little conversion. But through last week's exercise, now write
Homework, or very fast.
This two-week harvest:
1, solve the problem step: A, analyze test instructions First, find out the problem request. b, write the code on the paper probably or draw the approximate flowchart. C. Write the final code on the console
2, find the solution of the problem:
A. Declaring a bool variable;
B. Enter the loop to determine if the search is complete.
C. If you have not finished searching, continue to search. If the search is complete, the final result is output.
Eg: Finding the problem: whether the array can be removed
Int[] nums={3,65,23,22};
Console.WriteLine ("Please enter a number:");
int N=convert.toint32 (Console.ReadLine ());
Console.WriteLine ("The number you entered is: {0}", n);
BOOL can = FALSE;
for (int i = 0; i < Nums. Length; i++)
{
If (Nums[i]% n = = 0) {
can = true;
Break

}
}
if (can==true)
{
Console.WriteLine ("Divisible");

}
else {
Console.WriteLine ("Cannot divide evenly");
}

。 NET Beginner

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.