Dec 19, 2013 at 5:42pm
i want to display the power 3 of 5th number entered.
but output is power of...: 0
can someone please help?
thank you
------------------------------------------------------------------------------
#include <stdio.h>
#include <math.h>
void main ()
{
int x[10];
for(int j=1; j<11; j++)
{ printf("\nEnter integer number %d: ",j);
scanf("%d",&x[j]);
}
printf("\n9th number dvided by 1st number: %d",(x[9])/(x[1]));
}
Last edited on Dec 19, 2013 at 5:43pm
Dec 23, 2013 at 7:12am
@Duoas could u please point it out?
i don really understand
Dec 23, 2013 at 7:14am
int variables cant hold fractions...you will need float,double variables.