Home > Back-end >  For help
For help

Time:03-12

C language small white for help how to solve the

CodePudding user response:

Remind you not safe, so changed the scanf function to scnaf_s function

CodePudding user response:

reference 1/f, a white steamed bun response:
remind you not safe, so changed the scanf function to scnaf_s function

But I later still can not be added

CodePudding user response:

before and after the two words don't build, the scanf (" % f, % f", & amp; A, & amp; B);

CodePudding user response:

The
reference 3 floor QZJHJXJ response:
before and after the two words don't build, the scanf (" % f, % f", & amp; A, & amp; B);

Modified shows: LNK2005 _main already in ConsoleApplication1. Obj (first line) defined in
LNK1169 find one or more of the multiple definitions of symbols (first line)

CodePudding user response:

Reference:
 # include & lt; Stdio. H> 
# include & lt; Conio. H>//getch () function header file
Void main ()
{
Float A, B, C, S;

Printf (" input A and B: ");

The scanf (" % f % f ", & amp; A, & amp; B);//the scanf (" % f, % f ", & amp; A, & amp; B); Input format or cancel ', 'more convenient
no.
C=A + A + B + B;

S=A * B;

Printf (" circumference is: % f, covers an area of: % f ", C, S);

getch();

}

//input A and B: 1.2 2.3
//circumference is: 7.000000, area: 2.760000
  • Related