תודה.
void main(){int tmp=0,max=0,i;printf("Pls enter a 10 number:\n\n");scanf("%d",&max);for( i=0;i<9;i++){ scanf("%d",&tmp); if (tmp>max) { max=tmp; }}printf("And the Winner is: %d ",max);}
void main(){
int tmp=0,max=0,i;printf("Pls enter a 10 number:\n\n");scanf("%d",&max);for( i=0;i<9;i++){ scanf("%d",&tmp); if (tmp>max) { max=tmp; }}
printf("And the Winner is: %d ",max);
}
https://www.xchef.co.il | אתר בישולים חברתי
#include <stdio.h>int main(){ int a,b,c=0; printf("Enter 10 numbers: "); for(a=0;a<10;a++) { scanf("%d", &b); if(b>c) b=c; פה הייתה הטעות!! הייתי צריך לרשום את זה הפוך } printf("%d",c);scanf("%d");}
#include <stdio.h>
int main(){ int a,b,c=0; printf("Enter 10 numbers: "); for(a=0;a<10;a++) { scanf("%d", &b); if(b>c) b=c; פה הייתה הטעות!! הייתי צריך לרשום את זה הפוך } printf("%d",c);scanf("%d");}