题库

用二分法求2×3-4×2+3x-6=0的根

用二分法求2x3-4x2+3x-6=0的根,要求误差小于10-5  #include <stdio.h>#include <math.h>#include <conio.h>/*  This is the main program  */void main(){   float a=...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01600

从键盘上任意输入50个正整数,统计其中各位数字的平方和

从键盘上任意输入50个正整数,统计其中各位数字的平方和等于108的数。 #include 'stdio.h'#include 'conio.h'int main(void){ int i,a,x,s;  for(i=1;i<=50; i++)  { scanf('%d',&x);...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01910

下列程序的执行结果是什么?

涓嬪垪绋嬪簭鐨勬墽琛岀粨鏋滄槸浠€涔堬紵#include聽'stdio.h'#include聽'stdlib.h'#include聽'time.h'聽void main(){int聽a, b, answer, result,error, score, i, op;聽聽聽聽聽聽 srand(time...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01650

下列程序的执行结果是什么

下列程序的执行结果是什么?#include 'stdio.h'void main(){ int i,a,b,x; a=1; b=1; printf('%d %d ',a,b); for(i=0; i<18;i++)       {x=a+b;    a=b;    b=x;    pr...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
0680

下面程序为求两个数的最大公约数和最小公倍数

下面程序为求两个数的最大公约数和最小公倍数。#include 'stdio.h'void main(){ int m,n,num1,num2,temp;   printf('Input two positive integer:\n');   scanf('%d,%d',&num1,   ...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01000

下面程序是计算表达式1+(1+2)+(1+2+3)

下面程序是计算表达式1+(1+2)+(1+2+3)+…+(1+2+3+…+10)和。#include 'stdio.h'void main(){int sum,i,j,t; sum=    ①     ;  for(i=1;i<=10;i++)        {t=0;     ...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01490

下面的程序是求1~100之间的素数

下面的程序是求1~100之间的素数,并将所有素数按每行10个输出。#include 'stdio.h'#define 'math.h'★void main(){ int i,m,k,n; ★  for(m=1;m<=100;m=m+2)  {   if(n/10==0) ★ ...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01090

下面程序是求表达式1-1/2+1/3-1/

下面程序是求表达式1-1/2+1/3-1/4+1/5-……-1/100的值,结果保留小数后4位。#include 'stdio.h'void main(){int i; float s; i=0; ★ s=1; ★while(i<100){ if(i%2==0)        s=s...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
02610

编写一个程序输出所有5位数字的回文

编写一个程序输出所有5位数字的回文 法一:#include <stdio.h>#include <conio.h>void main(){  long int m;   for(m=10001;m<=99999;m++)   {     if((m%10==m/10000...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
02960

编写一个程序从键盘上输入两个整数i,j

编写一个程序从键盘上输入两个整数i,j,将这两个整数的值互换后输出。#include<stdio.h>#include 'conio.h'void main(){ int i,j, k ;printf('Please input two integers:');scanf('%d%d'...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
01940

根据圆柱体的半径和高,计算圆周长、圆面积、

根据圆柱体的半径和高,计算圆周长、圆面积、圆柱体表面积、圆柱体体积(所有输出结果要求保留小数点后2位)。(提示:保留小数点后2位,可用形如printf('%10.2f ',x);来实现。)  #include&l...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
04710

编程输出以下图形

缂栫▼杈撳嚭浠ヤ笅鍥惧舰銆偮犅犅犅犅犅犅犅犅犅犅犅?1聽聽聽聽聽聽聽聽聽聽 2聽2聽聽聽聽聽聽聽聽聽 3聽3聽3聽聽聽聽聽聽聽 4聽4聽4聽4聽聽聽聽聽聽 5聽5聽5聽5聽5聽聽聽聽 6聽6聽6聽6聽6聽6...
伊丞的头像-伊丞小站(YLIMHS.COM)钻石会员伊丞
0630