Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- void to_next(char* cptr);
- int main(){
- char c;
- while(1){
- printf("Enter: "); fflush(stdin);
- scanf("%c",&c);
- if(c>='a'&&c<='z'){
- to_next(&c);
- printf("= %c\n",c);
- }else{
- break;
- }
- }
- return 0;
- }
- void to_next(char* cptr){
- //printf("\n%d\n",cptr);
- //printf("%c\n",*cptr);
- if(*cptr!='z'){
- *cptr+=1;
- }
- else{
- *cptr='a';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment