Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Finding power using recursion
#include<stdio.h> float power(int,int); int main() { int x,y; printf("Enter two numbers\n"); scanf("%d%d",&x,&y); printf("%d to the power %d is %f",x,y,power(x,y)); return 0; } float power(int x, int y) { if(y==0) return 1; else if(y>0) return (x*power(x,y-1)); else return ((1/x)*power(x,y-1)); }
run
|
edit
|
history
|
help
0
18BCE2182 ASSESS_3 Q3
add.c
Assignment 3 Final
-Wall
scanf and integer manipulation
C_141113_dividirRestasSucesivas
DIGITOS DE U. A DECENAS
segundo avance de la lista enlazada
signaling NaN test
Conflito entre 4 threads