29个经典C#小例子.pdfVIP

  • 528
  • 0
  • 约2.87万字
  • 约 24页
  • 2017-06-25 发布于河南
  • 举报
29个经典C#小例子

1 // (2)编写程序,输出100以内个位数为6且能被3整除的所有的数。 using System; using System.Collections.Generic; using System.Text; namespace exercise { class Program { static void Main(string[] args) { for (int i = 1; i 100; i++) if ((i % 10 == 6) (i % 3 == 0)) Console.WriteLine(i); } } } 7 // (3)编写一个简单的计算器程序,能够根据用户从键盘输入的运算指令和整数,进行简单的加减乘除 运算。 using System; using System.Collections.Generic; using System.Text; namespace exercise3 { class Program { static void Main(string[] args) {

文档评论(0)

1亿VIP精品文档

相关文档