#include <stdio.h>
#include <iostream>
#include <math.h>
#include <sstream>
main ()
{
float sueldo,nomina,suma;
int i;
std::string empresa;
std::cout<<"Introduce el nombre de la empresa:"<<"\n";
std::getline(std::cin,empresa);
for (i=1;i<=12;i++)
{
std::cout<<"Introduce el sueldo del trabajador"<<i<<":"<<"\n";
std::cin>>sueldo;
suma=suma+sueldo;
}
nomina=suma;
std::cout<<"La empresa "<<empresa<<" debe pagar una nomina de: "<<suma;
return 0;
}
I don't have an idea of how to pass this same program using the While cycle, could someone help me, the problem says that 12 salaries are entered and that in the end the payroll to be paid by said company is printed, which was previously requested name too.