C Exercise Example 81
100 cases of classic C language
Title: 809 * 800 * ?? = ?? double-digit + 9 + 1 * ?? ?? which represented 8 * ?? result of double-digit, 9 * ?? results 3 digits. ?? Representatives seeking double-digit, and the results after 809 * ??.
Program Analysis: None.
Source Code:
// Created by www.w3big.com on 15/11/9. // Copyright © 2015年 本教程. All rights reserved. // #include<stdio.h> #include<stdlib.h> int main() { int i; for(i=10;i<100;i++) if(8*i<100&&9*i>99&&9*i<1000) { printf("??代表的两位数为:%d\n",i); break; } printf("809*%d==800*%d+9*%d+1\n",i,i,i); return 0; }
Run the above example output is:
??代表的两位数为:12 809*12==800*12+9*12+1