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;
}
You are declaring two variables for nothing (c and d). Anyways, thanks for the help!
ReplyDeletedecha o cara
ReplyDelete