СА
Святослав Агафонов
for( i = 0; i < len; i++ ) c[ a[ i ] ]++; printf( "3 = %d\n4 = %d\n5 %d\n", c[ 3 ], c[ 4 ], c[ 5 ] );
Стёпик: Чувак, у тя в решении никакой фантазии.
#include
using namespace std;
int main(){
int three, four, five, temp;
while(scanf("%d", &temp)){
if(temp == 5){
++five;
}
else if(temp == 4){
++four;
}
else if(temp == 3){
++three;
}
}
printf("%d fives %d fours %d threes", five, four, three);
return 0;
}