Straight up flexing on us with his grade evaluations
@preetikabra57373 жыл бұрын
Mike best
@ihssancanimturk_sayfor10 ай бұрын
wonderful me think ;)
@ihssancanimturk_sayfor10 ай бұрын
same to switch the same result, skip the line of char operator input: int main(){ double num1; double num2; char op; printf("A number: "); scanf("%lf", &num1); printf("An operator: "); scanf("%c", &op); printf("A number: "); scanf("%lf", &num2); printf("%f,%c,%f", num1, op, num2); return 0; }
@ihssancanimturk_sayfor10 ай бұрын
switch statement on the draft ok
@ihssancanimturk_sayfor10 ай бұрын
check also for this: int main(){ double num1; double num2; char op[5]; printf("A number: "); scanf("%lf", &num1); printf("An op: "); fgets(op,5,stdin); printf("A number: "); scanf("%lf", &num2); printf("%f,%s,%f", num1, op, num2); return 0; } fgets also not working with an operator input, just a try not a must 5 characters, also escaped the line, any idea?