I am trying to write an function, which takes an string as input and do something and return the strings.
Here Is a small try from my side.
#include<stdio.h>
char algo(char n)
{
char result[15];
if(n=='1' || n=='2' || n=='3' || n=='4' || n=='5' || n=='6')
{
result = n;
}
else
{
result = '10';
}
return result;
}
I am new to C.