ABCD太直接了就不放了
E 求一元二次方根 C语言
1 #include <stdio.h> 2 #include <math.h> 3 int main() 4 { 5 double a=0; 6 double b=0; 7 double c=0; 8 scanf("%lf%lf%lf",&a,&b,&c); 9 double r1=(-b+sqrt(b*b-4*a*c))/(2*a); 10 double r2=(-b-sqrt(b*b-4*a*c))/(2*a); 11 printf("r1=%7.2f ",r1); 12 printf("r2=%7.2f",r2); 13 return 0; 14 }
F 字符输入输出 C++
1 #include <iostream> 2 #include <string> 3 using namespace std; 4 int main() 5 { 6 string boy; 7 cin>>boy; 8 cout<<boy; 9 10 }