经典C#例子借鉴.pdfVIP

  • 21
  • 0
  • 约3.71万字
  • 约 24页
  • 2021-11-15 发布于福建
  • 举报
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

文档评论(0)

1亿VIP精品文档

相关文档