I want to do a program that verifys if a number is in other number...We have a "x" between(1 and 99) and a "n" integer...
We say the number x and the n and it will verify if x is in n or not...i've tried something like this:
Code:#include <stdio.h> int n; int x; int y=0; int main(void){ printf("x: "); scanf("%d",&x); printf("n: "); scanf("%d",&n); verificar(x); } int verificar(int x){ if (x<10) while (n>0){ n=n%10; printf("%d",n); return n; } } I have a problem in the cicle cause it will print only the first number of n&10.... anyone to help?