Declaration of Cube
Guys please help me.. Is this a right way to declare cube.?
If i Compile it.
It Says: Cube undeclared
what should i do?
Please help
\thanks in advanced
#include<stdio.h>
#include<math.h>
#include<conio.h>
main( )
{
float x,y;
while(x++<10.0)
{
printf("Enter Number:");
scanf("%d", &x);
y = cube(x);
printf("%f %f %f \n", x,pow(x,2),y);
cube(x);
}
{
float x;
float y;
y = x*x*x;
}
getch();
return (y);
}
Answers were Sorted based on User's Feedback
Answer / michael
you need to do
printf("Enter Number:");
scanf("%d", &x);
before entering while loop
becauser in while loop it needs to know what is x
or
float x=0
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sanjay741
its so simple... 1st of all i would like to tell you that Cube(element) is not a math function... so develop a function for cude and just call it...
| Is This Answer Correct ? | 1 Yes | 1 No |
when i use cout or cin call & then either << or >> .....it shows declaration syntax error...what should i do? cout<<"anything"; int a; cin>>a; return 0;
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }
who was the present cheif governor of reserve bank of india
6 Answers State Bank Of India SBI,
difference between c/c++ programing language? what is necessesity of c++ when existing c programing language?
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
what is meant by linking error? how can i solve it? if there is a linking error " unable to open file 'cos.obj'? then what should i do?
void main() { int i=7; printf("N= %*d",i,i); }
void main() { for(int i=0;i<5;i++); printf("%d",i); } What is the output?..
32 Answers College School Exams Tests, CTS, HCL, iGate, SmartData,
what is the large sustained error signal that eventually cause the controller output to drive to its limit
What are the different types of errors in C and when they occur?
#include<>stdio.h> #include<>conio.h> { printf("hello"); void main() getch(); } what the out put of this program and why ......plz clear my answer
what is exceptions?