Untitled
unknown
c_cpp
2 years ago
314 B
7
Indexable
#include <stdio.h>
int main(void) {
float a, b, x;
printf("input a =");
scanf("%f", &a);
printf("input b =");
scanf("%f", &b);
if(a == 0){
if(b == 0){
printf("x = any number");
}
else{
printf("there is no solution");
}
}
else{
printf("x = %f\n", -b/a);
}
}Editor is loading...
Leave a Comment