皮皮学,免费搜题
登录
搜题
【单选题】
从键盘任意输入a,b,c的值,编程计算并输出下面一元二次方程的根【图片】当a=0时,输出“该方程不是一元二次方程”,当a≠0时,分三种情况计算并输出方程的根,即:【图片】,两个不相等的,分别为:x1 = p+q,x2 = p-q【图片】,两个相等的为:x1 = x2 =p【图片】,一对共轭复根,分别为:x1 = p+qi,x2 = p-qi按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include #include #include #defineEPS1e-6intmain(){floata,b,c,disc,p,q;printf("Pleaseenterthecoefficientsa,b,c:");scanf("%f,%f,%f",&a,&b,&c);if(________)/*a=0时,输出“不是二次方程”*/{printf("Itisnotaquadraticequation!\n");exit(0);}disc=b*b-4*a*c;/*计算判别式*/p=-b/(2*a);q=sqrt(fabs(disc))/(2*a);if(___________)/*判别式等于0时,输出两相等*/{printf("x1=x2=%.2f\n",p);}else{if(__________)/*判别式大于0时,输出两不等*/{printf("x1=%.2f,x2=%.2f\n",p+q,p-q);}else/*判别式小于0时,输出两共轭复根*/{printf("x1=%.2f+%.2fi,",p,q);printf("x2=%.2f-%.2fi\n",p,q);}}return0;}
A.
第11行: fabs(a) <= EPS 第20行: fabs(disc) <=EPS 第26行: disc> EPS
B.
第11行: fabs(a) = 0 第20行: fabs(disc) = 0 第26行: disc > EPS
C.
第11行: fabs(a) = 0 第20行: fabs(disc) <= EPS 第26行: disc>= 0
D.
第11行: fabs(a) <= EPS 第20行: fabs(disc)=0 第26行: disc>= EPS
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】I was paid last week, but I can’t remember the exact _____ of the money.
A.
number
B.
quality
C.
amount
D.
percent
【简答题】It was a long journey, but we ____________ arrived. 旅程很长,但我们最后还是到达了。 火势终于被控制住了。_____________________________ He will _____________ the money in monthly installment. 他将按每月分期付款的方式还钱。 I lent him some mon...
【单选题】I was paid last week, but I can't remember the exact ________ of money.
A.
number
B.
quality
C.
amount
D.
altitude
【单选题】听力原文:Seafood prices had come down. The shrimp had been 3 dollars a pound last week by this Monday, it was only two dollars. So I bought 4 pounds. (24)
A.
I paid 4 dollars for the shrimp.
B.
I paid 6 dollars for the shrimp.
C.
I paid 8 dollars for the shrimp.
D.
I paid 12 dollars for the shrimp.
【单选题】属于颠换的碱基替换为( )
A.
A和T
B.
A和G
C.
T和C
D.
C和U
【简答题】请用下列单词填空: What how when where who that if 1) It’s Christmas Day. The children don’t know __________ is in their stockings. 2) David borrowed 200 Yuan from me last week, b...
【单选题】属于颠换的碱基替换为
A.
G和T
B.
A和G
C.
T和C
D.
C和U
E.
T和U
【单选题】Decide if the sentence is a comma splice or a complete sentence。 ·After I was paid last week, I was able to do the grocery shopping.
A.
Comma splice
B.
Complete sentence
【单选题】属于颠换的碱基替换为。()
A.
G和T
B.
A和G
C.
T和C
D.
T和U
【单选题】I paid a visit to the small town last week where I was born, which I hadn’t visited for years.
A.
Every time
B.
Once more
C.
On time
D.
Now and then
相关题目: