C 练习实例81
C 语言教程
· 2019-02-22 14:12:49
题目:809*??=800*??+9*?? 其中??代表的两位数, 809*??为四位数,8*??的结果为两位数,9*??的结果为3位数。求??代表的两位数,及809*??后的结果。
程序分析:无。
实例
// Created by www.codercto.com on 15/11/9.
// Copyright © 2015年 码农教程. All rights reserved.
#include <stdio.h>
void output(long int b, long int i){
printf("\n%ld = 800 * %ld + 9 * %ld\n", b,i,i);
}
int main(){
void output(long int b, long int i);
long int a,b,i;
a = 809;
for(i = 10; i < 100; i++){
b = i * a;
if (b >= 1000 && b <= 10000 && 8 * i < 100 && 9 * i >= 100){
output(b, i);
}
}
return 0;
}
以上实例运行输出结果为:
9708 = 800 * 12 + 9 * 12
点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html
Numerical Recipes 3rd Edition
William H. Press、Saul A. Teukolsky、William T. Vetterling、Brian P. Flannery / Cambridge University Press / 2007-9-6 / GBP 64.99
Do you want easy access to the latest methods in scientific computing? This greatly expanded third edition of Numerical Recipes has it, with wider coverage than ever before, many new, expanded and upd......一起来看看 《Numerical Recipes 3rd Edition》 这本书的介绍吧!