0

I wrote this code that inputs employees salaries and distributes them to how much they made.

I need some help translating this code into C++

```
#include <stdio.h>
int main(){
int sales[9]={0};
double gross=0, percent=0, salary=0;
int total=0;
int counter=0;
printf("For 5 peoples salary ranges, Enter the first gross\n");
scanf("%d", &gross);
percent=gross*0.09;
salary=200+percent;
while (counter!=5){
if (salary>=200 && salary <= 299)
sales[0]++;
if (salary>=300 && salary<=399)
sales[1]++;
if (salary>400 && salary<=499)
sales[2]++;
if (salary>=500 && salary<=599)
sales[3]++;
if (salary>=600 && salary<=699)
sales[4]++;
if (salary>=700 && salary<=799)
sales[5]++;
if (salary>=800 && salary<=899)
sales[6]++;
if (salary>=900 && salary<=999)
sales[7]++;
if (salary>=1000)
sales[8]++;
printf("Enter the next gross\n");
scanf("%d",&gross);
counter++;
}
printf("%d are in 200-299,%d are in 300-399, %d are in 400-499, %d are in 500-599, %d are in 600-699, %d are in 700-799, %d are in 800-899, %d are in 900-999, %d are in the 1000 range\n", sales[0], sales[1], sales[2], sales[3], sales[4], sales[5], sales[6], sales[7], sales[8]);
return 0;
}
```