please help me. i have a presentation tomorrow

#include <iostream>
using namespace std;

void display();
int fabricNum; //declared variable globally

int main()
{
int x,y,z;
cout<<"enter warp length"<<endl;
cin>>x;
cout<<"enter weft length"<<endl;
cin>>y;
cout<<"enter cloth length"<<endl;
cin>>z;

int q;
int w;
int e;
float c, d;
{
c= (x-z/z)*100;
d= (y-z/z)*100;
}
cout<<"warp crimp percentage is "<<c<<endl;
cout<<"weft crimp percentage is "<<d<<endl;

int i;
for ( i=0;i<=100;i++);

if ( d>0)
cout<<"the highest crimp percentage is "<<d<<endl;
else
cout<<"the highest crimp percentage is "<<c<<endl;
}
void display( int list [])
{
int index;
for ( index =0;index<10;index++)
{
cout<<"enter fabric"<<index<<" ";
cin>>list[index];
}
cout<<endl;
}
What are you requesting? Any question/issue you're having?
What is your code supposed to do? What's wrong with it?
PSEUDOCODE :
1) Read warp length, l
2) Read weft length, w
3) Read cloth length, p
4) Calculate warp crimp percentage(%), c
c = (l - p) / p * 100
5) Calculate weft crimp percentage(%), d
d = (w - p) / p * 100
6) Print warp crimp percentage(%), c and weft crimp percentage(%), d


this is my final project, and the question ask to do a programming c++ which include loop, function, array, and if else statement in one coding. can you help me. i have to present today
A few things first:

1) you still haven't asked a question,
2) you haven't told us what your program is supposed to do,
3) waiting until the last day to ask for help is a terrible idea,
4) please use [code][/code] tags when sharing code,

Next, there are a few issues I can see with your code:

1) void display(); void display( int list []) The argument lists are different
2)
1
2
c= (x-z/z)*100;
d= (y-z/z)*100;

i) think about the order of operations and what you are doing with x-z/z
ii) x, y, z are all integers, so x-z/z is going to result in integer division (considering that you store the result in a float, I assume this is not what you intended?)
3) for ( i=0;i<=100;i++); does nothing. I assume this has to do with there being an array in display? But, you haven't really explained what you are trying to do so I'll leave it at that
The answer to Life, the Universe and everything, is 42.
Why 42 though? I'm intrigued..
Oh dear, this is gold haha. How tempting is it to answer every post with that now... :D
Registered users can post here. Sign in or register to post.