#include <stdio.h>
#include <stdlib.h>
int main()
{
int num,temp,i;
int largest = 0;
printf("Please enter how many numbers you want to compare? : ");
scanf("%d",&num);
printf("\n");
for ( i=1; i<=num ; i++)
{
printf("Please enter number%d : ",i);
scanf("%d",&temp);
if( temp > largest)
{
largest = temp;
}
}
printf("\nThe largest number is %d ! ",largest);
return 0;
}
怎麼跑都對
但交出去都錯:(
有人可以幫忙看一下嗎:D
#include
#include
int main()
{
int num,temp,i;
int largest = 0;
printf("Please enter how many numbers you want to compare? : ");
scanf("%d",&num); printf("\n");
for ( i=1; i<=num ; i++)
{
printf("Please enter number%d : ",i);
scanf("%d",&temp);
if( temp > largest)
{
largest = temp;
}
}
printf("\nThe largest number is %d ! ",largest);
return 0;
}
怎麼跑都對
但交出去都錯:(
有人可以幫忙看一下嗎:D