Friday, 15 January 2016

Solution of URI 1864 :: Our Days Are Never Coming Back


Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

/**Bismillahir Rahmanir Rahim.**/

#include <stdio.h>
int main()
{
    int a,b,c,d;
    char ara[40]="LIFE IS NOT A PROBLEM TO BE SOLVED";
    scanf("%d", &a);
    for(b=0; b<a; b++)
        printf("%c", ara[b]);
    printf("\n");
    return 0;
}

2 comments:

  1. You are declaring two variables for nothing (c and d). Anyways, thanks for the help!

    ReplyDelete

Note: only a member of this blog may post a comment.