NOTE... I dont want the actual answer of the syntax to solve the problem i want the strategy good damn it i like to figure it out on my own so dont spoil it for me if i cant do it i will ask for the actual answer myself..until then..hint me guys..
after sucessfully completeing the first assignment becuz of the gurus here.. i was doing epic i was doing assignment and lab assignments like a pro..gentlmen i have come to the point where my teacher has stumped me again.. i now need the help..
dont worry i did try this time.. phas gaya hoon..
TASK: take 10 input values from the user and show the maximum and minimum value..
ok here is wat i did...
FIRST THE HIGH NUMBER PART...i will figure the small value after that..
void main()
{
.
BLA BLA BLA YADDA YADDA;
.
for(int i=0;i<=0;i++)
{
cin>>N;
}
.
.
BLAH BLAH BLAH YAADA YADDA YADD
for(int a=0; a<=8; a++)
{
if( N > N[i+1] )
high=N;
BLA BLA BLA
here is my question... assuming the loop goes once cuz of the if statement it will compair N[0] and N[1] then on the next run N[1]>N[2]
wat if N[2] is greater then N[0]????
how do i make it so that all the N[0] to N[9] compair each other.. again no smart pants moves i might not get..
YESH!!! HELP ME NOW..
after sucessfully completeing the first assignment becuz of the gurus here.. i was doing epic i was doing assignment and lab assignments like a pro..gentlmen i have come to the point where my teacher has stumped me again.. i now need the help..
dont worry i did try this time.. phas gaya hoon..
TASK: take 10 input values from the user and show the maximum and minimum value..
ok here is wat i did...
FIRST THE HIGH NUMBER PART...i will figure the small value after that..
void main()
{
.
BLA BLA BLA YADDA YADDA;
.
for(int i=0;i<=0;i++)
{
cin>>N;
}
.
.
BLAH BLAH BLAH YAADA YADDA YADD
for(int a=0; a<=8; a++)
{
if( N > N[i+1] )
high=N;
BLA BLA BLA
here is my question... assuming the loop goes once cuz of the if statement it will compair N[0] and N[1] then on the next run N[1]>N[2]
wat if N[2] is greater then N[0]????
how do i make it so that all the N[0] to N[9] compair each other.. again no smart pants moves i might not get..
YESH!!! HELP ME NOW..
Last edited: