-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTafhim1.c
43 lines (39 loc) · 849 Bytes
/
Tafhim1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <dos.h>
#include <windows.h>
#include <system.h>
void main()
{
clrscr();
char data[1][9999];
int len,i,j,k,l,time,n;
printf("Enter any string\n");
gets(data[0]);
printf("How many times do you want the text to rotate?\n");
scanf("%d",&n);
len=strlen(data[0]);
printf("%d\n",len);
for (time=0; time<n; time++)
{
for (i=0,l=0; i<=len; i++,l++)
{
if (l>len)
l--;
clrscr();
for (j=i; j<len; j++)
{
printf("%c",data[0][j]);
}
printf(" ");
for (k=0; k<l; k++)
{
printf("%c",data[0][k]);
}
printf("\n");
delay(60);
}
}
getch();
}