Home > Back-end >  C "% 3 f % % c. The 3 f=%. 3 f" prompt expression must contain class type how to solve
C "% 3 f % % c. The 3 f=%. 3 f" prompt expression must contain class type how to solve

Time:10-02

#include
Void main ()
{
Float data1, data2, r;
Char op;
The scanf (" % f % c % f ", & amp; Data1, & amp; Op, & amp; Data2);
The switch (op)
{
Case '+' : r=data1 data2 +; break;
Case '-' : r=data1 data2; break;
Case '*' : r=data1 * data2; break;
Case '/' : r=data1/data2;
}
Printf (" % 3 f % % c. The 3 f=%. 3 f ", data1, op, data2, r);

CodePudding user response:

The last line of print parameter errors,
Print (" % 3 f % % c. The 3 f=%. 3 f, data1, op, data2, r);//attention after the format string is commas, not periods

CodePudding user response:


Have a tip this right now

CodePudding user response:

reference 1st floor qybao response:
the last line of print parameter errors,
Print (" % 3 f % % c. The 3 f=%. 3 f, data1, op, data2, r);//after pay attention to the format string is comma, not the dot
ok thank you??
  • Related