Time:03-12
CodePudding user response:
remind you not safe, so changed the scanf function to scnaf_s function
before and after the two words don't build, the scanf (" % f, % f", & amp; A, & amp; B);
# 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
Page link:https//www.codepudding.com/Backend/104046.html