Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Atoi without minus
//gcc 5.4.0 #include <stdio.h> #include<stdlib.h> int myatoi(char *str) { int res=0; int i=0; int sign=1; if(str[0]=='-') { sign=-1; i++; } for(i=0;str[i]!='\0';++i) res=res*10+str[i]-'0'; return res*sign; } int main () { char str1[ ]="6"; char str2[ ]="5"; int number1=myatoi(str1); int number2=myatoi(str2); printf("%d\t%d\n",number1, number2); printf("%d",number1*number2); return 0; }
run
|
edit
|
history
|
help
0
strrev
back
3,6,8
Función bsearch
Welcome1
polymorphism simulation in plain C with a simple structures
Star 1,3
Array Practice
PROTOTIPO PREGUNTA 1 DE GUÍA 4
SOLUCION EJERCICIO SPOTIFY