Toph Better Passwords Solution

Solve in C:

#include<stdio.h>
#include<string.h>
int main()
{
    int n,i,l;
    char s[100];
    scanf("%s",s);

    l=strlen(s);
    for(i=0; i<l; i++)
    {
        if(i==0)
        {
            if(s[0]>='a'&&s[0]<='z')
                printf("%c",s[0]-32);
            else if(s[0]>='A'&&s[0]<='Z')
                printf("%c",s[0]);
        }
      else
        if(s[i]=='s')
            printf("$");
        else if(s[i]=='i')
            printf("!");
        else if(s[i]=='o')
            printf("()");
        else
            printf("%c",s[i]);

    }
    printf(".");

}

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.