-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRSL (1).C
75 lines (70 loc) · 865 Bytes
/
RSL (1).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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include<graphics.h>
#include"as.c"
//void main()
void result(int h)
{
//int h=23;
char q[100],ch;
int t,i=0;
int rev=0;
clrscr();
//char ch=h-'0';
//char m[3];
//int h=5;
closegraph();
while(h>0)
{
t=h%10;
rev=rev*10+t;
h=h/10;
}
//print("%d",rev);
while(rev>0)
{
t=rev%10;
// ch=t-'0';
if(t==1)
{
q[i]= '1';
}
if(t==2)
{
q[i]= '2';
}
if(t==3)
{
q[i]= '3';
}
if(t==4)
{
q[i]= '4';
}
if(t==5)
{
q[i]= '5';
}
if(t==6)
{
q[i]= '6';
}
if(t==7)
{
q[i]= '7';
}
if(t==8)
{
q[i]= '8';
}
if(t==9)
{
q[i]= '9';
}
// printf("%c\n",2);
i++;
rev=rev/10;
}
q[i]='\0';
// printf("%s",q);
// getch();
display(q);
}