编程:三位数的偶数,所有个位数字之和是十五的倍数的数的和

1个回答

  • using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication5{class Program{static void Main(string[] args){for (int i = 100; i < 1000; i++){int baiwei = i / 100;int shiwei = i / 10 % 10;int gewei = i % 10;if (baiwei + shiwei + gewei==15&&i%2==0){ Console.WriteLine(i);}}Console.ReadKey();}}}用C#编写的.