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 |
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 meant for variable not found?
Write a c-programe that input one number of four digits and find digits sum?
Using string functions write a program that will accept the name of the capital as input value and will display the corresponding country. ------------------------ Capitals Countries ------------------------ Capitals Countries Ottawa Canada Moscow Russia Rome Italy I can't not get it to run properly
main() { char c; for(c='A';c<='Z';c++) getch(); }
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,
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 the out put of this programme? int a,b,c,d; printf("Enter Number!\n"); scanf("%d",&a); while(a=!0) { printf("Enter numbers/n"); scanf("%d%d%d",&b,&c,&d); a=a*b*c*d; } printf("thanks!"); getche(); Entering numbers are a=1,b=2,c=3,d=4 b=3,c=4,d=-5 b=3,c=4,d=0
#include"stdio.h" #include"conio.h" void main() { int a; printf("\n enter a number:"); scanf("%c\n"); getch(); }
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); }
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }