#include<stdio.h>
main()
{
long int number;
do
{
printf("Enter your Serial Number\n");
scanf("%d",&number);
if (number<1234567)
printf("Try again\n\n");
}
while (number < 1234567 );
printf("Congratulations\n\n");
}
晕死,你没有出错,怎么会有此一问?
注意书写格式就行了。
#include <stdio.h>
main()
{
long int number;
printf("Enter your serial number:\n");
scanf("%d",&number);
if (number<1234567)
printf("Try again\n");
else
printf("Congratulations\n");
}