程序43:<p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-spacerun: 'yes'; mso-font-kerning: 0.0000pt;">求0—7所能组成的奇数个数。 </span></p><!--EndFragment-->
public class java43 {
public static void main(String[] args) {
long i;
int count = 0;
for (i = 0; i <= 7777777; i++) {
if (i % 10 == 1 || i % 10 == 3 || i % 10 == 5 || i % 10 == 7)
count++;
}
System.out.println(count);
}
}