First Encounter with ACM — Lively Elves

Words: 91

The charm of programming also lies in the fact that there is often more than one way to solve a problem.

I’ve done this mobile short number problem quite a few times by now…

I’ll probably have to write it out again when I organize things later…

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include<stdio.h>
int main()
{
    int n;
    int i;
    char m[12];
    scanf("%d",&n);
    while(n--)
    {
        scanf("%s",m);
        printf("6%s\n",m+6);

    }
    return 0;
}

This is exactly what makes computers wonderful~ isn’t it?

This post is licensed under CC BY-NC-SA 4.0. If it helped, or if you have anything to say, the comment box below is open.
Page views —
Unique visitors —

Loading...