Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
823 B
2
Indexable
Never
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void num_to_letter(int a);

int main(void)
{
    int stu_id = 70357003;

    char num_series[100];
    int condition = 1;
    printf("Input a series of integers separated by a space: ");
    scanf("%[^\n]", num_series);

    while(condition){
        for(int i = 0; i <= strlen(num_series); i++){
            if(num_series[i] == ' '){
                continue;
            }
            else if(num_series[i] == '\0'){
                condition = 0;
                break;
            }
            else{
                num_to_letter(num_series[i]);
            }
        }
    }
    printf("\n\nStudent ID: %d\n\n", stu_id);
    return 0;
}

void num_to_letter(int a){
    int num_code = a + 96;
    printf("%c", num_code);
}