Name: Deab Sina
Major: D4 TMD ITB Batch6
Video:
Coding:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main()
{
char statement[40];
char temp[40];
int i, j, label;
printf("Please insert your text (40 character) : ");
gets(statement);
strcpy(temp, statement);
label = strlen(statement);
j = 0;
for(i = label; i >= 0; i--)
{
if(i != label)
{
temp[j] = statement[i];
j++;
}
}
printf("Your reverse text : %s\n\n", temp);
system("pause");
}
#include <stdio.h>
#include <string.h>
int main()
{
char statement[40];
char temp[40];
int i, j, label;
printf("Please insert your text (40 character) : ");
gets(statement);
strcpy(temp, statement);
label = strlen(statement);
j = 0;
for(i = label; i >= 0; i--)
{
if(i != label)
{
temp[j] = statement[i];
j++;
}
}
printf("Your reverse text : %s\n\n", temp);
system("pause");
}
This is the link to my video: http://youtu.be/EKsMEF3mnMM
Thanks,
No comments:
Post a Comment