The problem is that I need to stop printing when it reaches the last digit of the vector, but I do not know how to do it, and also how do I print after the z, because the way I did it, it did not print? (I'm a beginner so if you can explain how it works thank you)
#include <stdio.h>
#include <string.h>
int main () {
char cifra[50];
printf("\nInforme um texto: ");
gets(cifra);
for(int i=0; i<**50**; i++){
if(cifra[i]>'z'){
cifra[i]='a';
printf("%c",cifra[i]+1);
}else{
printf("%c",cifra[i]+3);
}
}
return 0;
}