5.15 Review; Total 5 questions

Source: Internet
Author: User

A. Number of 7 related to output 100/ Public voidSeven ()//{        //Console.WriteLine ("Within 100 of the number related to seven:"); //int count = 0; //for (int num = 1; num <=; num++)//    {        //if (num% 10 = = 7) | | (NUM/10 = = 7) | |        (num% 7 = = 0)) //count++; //console.write (num+ "\ t"); //    }        //Console.WriteLine ("Total" + count + "each"); //}two. Game score,///1-20: Own points, 21-30:10 points per level, 31-40:20 points per pass, 41-49:30 points per pass, 50:100 points///To find the total number/// </summary>         Public voidscore () {Console.Write ("Please enter the number of levels:"); intg =int.                      Parse (Console.ReadLine ()); if(g>0|| g< -)          {                intsum=0;  for(intI=1; i<=g;i++); {          if(g<= -) {sum+=1; }              Else if(g<= -) {sum+=Ten; }              Else if(g<= +) {sum+= -; }              Else if(g<= the) {sum+= -; }          Else{sum+= -;            }} Console.WriteLine (sum); }            Else{Console.WriteLine ("wrong input"); }        }/// <summary>three. 99 table, one line to print/// </summary>        //Public void jiujiutable ()//{        //For (int hang = 1, Hang <= 9; hang++)//    {        //For (int lie = 1; Lie <= hang; lie++)//        {        //Console.Write (Lie + "*" + hang + "=" + hang * lie+ "\ t"); //         }        //Console.WriteLine (); //    }        //Console.ReadLine (); //}/// <summary>               /// <summary>Four. Within 100 odd and/// </summary>        //Public void Jishuhe ()//{        //           //for (int num = 1; num <=; num + + 2)//    {        //Sum+=sum//Console.WriteLine ("Odd number within 100 and:" +sum); //    }        //}/// <summary>Five. 1 cents, 2 cents, 5 cents of coins, combined out 6 cents, three kinds of coins have, there are several ways/// </summary>        //Public void Yingbi ()//{        //int count = 0; //for (int x= 1; x<60; x + +)//    {        //for (int y= 1; y<30; y++)//        {        //for (int z= 1; z<12; z++)//            {        //if (x + y * 2 + z * 5 = =)//         {        //count++; //Console.WriteLine ("1 Cents" + x + "One, 2 cents" + y + ", 5 cents" + z + "each"); //                }        //            }        //        }        //    }        //Console.WriteLine ("A total of" +count+ "methods"); //}

5.15 Review; Total 5 questions

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.