Esempio n. 1
0
student InputAddrA(student list)
{
    printf("Enter name of the street: ");
    MyGets(list.addr_type.minsk.street, string_size);
    printf("Enter the number of house: ");
    list.addr_type.minsk.house = InputNum();
    printf("Enter the number of flat: ");
    list.addr_type.minsk.flat = InputNum();
    return list;
}
Esempio n. 2
0
student InputAddrB(student list)
{
    printf("Enter name of the regional city: ");
    MyGets(list.addr_type.regional_city.city, string_size);
    printf("Enter name of the street: ");
    MyGets(list.addr_type.regional_city.street, string_size);
    printf("Enter the number of house: ");
    list.addr_type.regional_city.house = InputNum();
    printf("Enter the number of flat: ");
    list.addr_type.regional_city.flat = InputNum();
    return list;
}
Esempio n. 3
0
student InputAddrC(student list)
{
    printf("Enter name of the region: ");
    MyGets(list.addr_type.district_town.region, string_size);
    printf("Enter name of the town: ");
    MyGets(list.addr_type.district_town.town, string_size);
    printf("Enter name of the street: ");
    MyGets(list.addr_type.district_town.street, string_size);
    printf("Enter the number of house: ");
    list.addr_type.district_town.house = InputNum();
    printf("Enter the number of flat: ");
    list.addr_type.district_town.flat = InputNum();
    return list;
}
Esempio n. 4
0
/*************************************************
	Function: 		main
	Description: 	主函数
	Calls: 			scanf	printf
	Called By:		编译器
	Input: 			无
	Output: 		无
	Return: 		0
*************************************************/
int main(void)
{
	int array[100];
	int num;
	printf("input the number:\n");
	scanf("%d", &num);
	InputNum(num, array);
	OutputNum(num, array);
	SwapMaxMin(num, array);
	OutputNum(num, array);
}
Esempio n. 5
0
student InputAddrD(student list)
{
    printf("Enter name of the region: ");
    MyGets(list.addr_type.village.region, string_size);
    printf("Enter name of the district: ");
    MyGets(list.addr_type.village.district, string_size);
    printf("Enter name of the village: ");
    MyGets(list.addr_type.village.village, string_size);
    printf("Enter name of the street: ");
    MyGets(list.addr_type.village.street, string_size);
    printf("Enter the number of house: ");
    list.addr_type.village.house = InputNum();
    return list;
}