The variable 'sele' is being used without being initialized./*this is the first program that designed by my self*/#include <stdio.h>int main(void){\x05int sele;\x05float a1;\x05float h1; printf("select the type:\n1-triangle"); sc

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 10:46:01
The variable 'sele' is being used without being initialized./*this is the first program that designed by my self*/#include <stdio.h>int main(void){\x05int sele;\x05float a1;\x05float h1;    printf("select the type:\n1-triangle");   sc
xUn0}SԮI4Mu7\V؉ i6M m@?70h/ӥ-pkQ}>>>v`%` "N\0'l0AH !1˶.+\ b ŽDpxm&rya hr_G4'@23\n?T Hj&%%&:TkLȗ2"Fn >qIQJqk_-?%3ҡ3" NBi9Ket C!4ۻ܂ވ!VBU$ji1aQK/V;nLi \99PB7%{6AVbO\{ңm02tp "y<`uJ+3Od}*NЄD /F sH%[y&I䜍|yiD (C"sD\>`an/~n~<9}?=ǟ/g)CMwhp?8|zSF;y&7 Y 9o؃5*9CB Eʔ>/#pTEA󕻆$F@R5 UTn"nfXنejrجݪ*64L FM/2h1FZZS1k:iպQU+Fͮ1i,?qnxe[&ezo n

The variable 'sele' is being used without being initialized./*this is the first program that designed by my self*/#include <stdio.h>int main(void){\x05int sele;\x05float a1;\x05float h1; printf("select the type:\n1-triangle"); sc
The variable 'sele' is being used without being initialized.
/*this is the first program that designed by my self*/
#include <stdio.h>
int main(void)
{
\x05int sele;


\x05float a1;
\x05float h1;
    printf("select the type:\n1-triangle");
   scanf("%d",sele);


\x05if(sele==1)
\x05getchar();
\x05{
\x05
\x05printf("please select the shape:\n1_rectangle\n");
\x05
     printf("please type in the base of triangle(the defualt length unit is cm):");
\x05scanf("%f",&a1);
\x05getchar();
\x05printf("please type in the height of the triangle(the defualt length unit is cm):");
\x05scanf("%f",&h1);
\x05getchar();
\x05printf("the area of triangle is:%.2f",a1*h1);
\x05getchar();
\x05return 0;
\x05}
\x05
\x05}






编译时没有提示错误  没有下划红色波浪线
但是一运行就提示不行!

The variable 'sele' is being used without being initialized./*this is the first program that designed by my self*/#include <stdio.h>int main(void){\x05int sele;\x05float a1;\x05float h1; printf("select the type:\n1-triangle"); sc
scanf("%d",sele); 改成 scanf("%d",&sele);