Landline telephone number structure of acquaintance

Description questions
define showing a structure of the type of phone number.
Telephone number including the area code (up to four) and district telephone numbers (up to 8). When dialing a telephone number with each other between a zone, not dial the area code, or you must dial the area code.
In the main function (using a region separated by a space between the area code and number) enter any two telephone numbers A and B, the output A to the time B call number dialed.
Input
Input consists of two lines, namely the telephone number A and B. Use a region separated by a space between the area code and number.
Output
Output A to B when the call number dialed.
Input Example 1
0432 87654321
089761234567
output Example 1
089 761 234 567
Input 2 Example
0432 87654321
043261234567
output example 2
61234567
range of data
input and output are strings

#include <stdio.h>

struct number
{
	long A;
	long B;
}s[3];
void main()
{
	int i;
	for(i=0;i<2;i++)
	scanf("%ld %ld",&s[i].A,&s[i].B);
	if(s[0].A==s[1].A)
	printf("%ld",s[1].B);
	else
	printf("0%ld%ld",s[1].A,s[1].B);
}

Guess you like

Origin blog.csdn.net/Lhw_666/article/details/91415488