标签:ase pre \n ++ highlight void The array else
#include <stdio.h> #include <stdlib.h> void main() { int Employee[10] = { 27000, 32000, 32500, 27500, 28500, 29000, 31000, 32500, 30000, 26000}; int Salary; int Counter = 0; int i; printf("Please input the employee salary: "); scanf("%d", &Salary); for ( i = 0; i < 10; i++) { if (Salary == Employee[i]) { printf("Number %d Employee‘s salary is %d!\n", i, Salary); Counter++; } } if (Counter == 0) { printf("No employee‘s salary is %d!!\n", Salary); } else { printf("Have %d employees salary is %d!!\n", Counter, Salary); } }
标签:ase pre \n ++ highlight void The array else
原文地址:https://www.cnblogs.com/lifelessfaultless/p/9271289.html