C
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
#include <stdio.h>
int main() {
char s[20],s1[20];
int a,a1,k,b[2];
/*key variable from above:
s:used for saving input string
s1:used for taking the number character from string s
a:used for saving first number in integer(|5|,5)
a1:used for saving number in integer(5,|5|)*/
for(int i=0;i<2;i++){
scanf("%s",s);
k=0;
for(int j=0;j<=20;j++){
if((s[j]>='0')&&(s[j]<='9')){
s1[j-k]=s[j];
}
else if(s[j]=='\0'){
if(k!=0)
a1=atoi(s1);
break;
}
else if(s[j]==','){
if(k==0)
a=atoi(s1);
k=j+1;
continue;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run