The variable 'sele' is being used without being initialized.
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/04/29 06:51:39
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}
编译时没有提示错误 没有下划红色波浪线
但是一运行就提示不行!
/*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}
编译时没有提示错误 没有下划红色波浪线
但是一运行就提示不行!
scanf("%d",sele); 改成 scanf("%d",&sele);
再问: 谢谢啊
再问: 谢谢啊
The variable 'sele' is being used without being initialized.
varible is being used without being initialized
the variable'discount' is being used without being initializ
C++运行问题:The variable 'Data' is being used without being init
程序出错:The variable 'y' is being used without being initialize
local variable 'n' used without having been initialized
local variable 'S' used without having been initialized
local variable 'x' used without having been initialized是什么意思
local variable 'd' used without having been initialized是什么意思
,Run-Time Check Failure #3 - The variable 'L' is being used
Run-Time Check Failure #3 - The variable 'r' is being used w
The username chosen is already being used.