C Saved Program: kind-rain

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include <stdio.h>

int main()
{
    char buf[] = "testetest";
    char pass[] = "0000000000";
    char v[10];
    char c[10];
    int i = 0;
    int t = 0;
    int vc = 0;
    int cc = 0;
    for (i=0; i < 10; i++)
    {
        if (buf[i] == 'q' || buf[i] == 'w' || buf[i] == 'e' || buf[i] == 'r' || buf[i] == 't'|| buf[i] == 'y'|| buf[i] == 'u'|| buf[i] == 'i'|| buf[i] == 'o'|| buf[i] == 'p')
        {
            v[vc++] = 'buf[i]';
        }
        else
        {
            c[cc++] = 'buf[i]';
        }
    }
    for (i=0; i < vc; i++)
    {
        if(v[i] == 'q')
        {
            v[i] = 1;
        }
        if(v[i] == 'w')
        {
            v[i] = 2;
        }
        if(v[i] == 'e')
        {
            v[i] = 3;
        }
        if(v[i] == 'r')
        {
            v[i] = 4;
        }
        if(v[i] == 't')
        {
            v[i] = 5;
        }
        if(v[i] == 'y')
        {
            v[i] = 6;
        }
        if(v[i] == 'u')
        {
            v[i] = 7;
        }
        if(v[i] == 'i')
        {
            v[i] = 8;
        }
        if(v[i] == 'o')
        {
            v[i] = 9;
        }
        if(v[i] == 'p')
        {
            v[i] = 0;
        }
        t = t + v[i];
        pass[i] = (v[i] + t) % 10;
            printf("%c",pass[i]);
    }
   // printf("%c",pass[i]);
    
    printf("\n");
    return 0;
}

Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs