0
The function to separate an integer number from a noninteger is simple
void Inteiro(float n)
{
int x = n;
float y = n;
if (x==y)
{
cout << "E inteiro" << endl;
}
else
{
cout << "Nao e inteiro" << endl;
}
}
I just wanted you to do something like this:
Data input example OBS: data is in a file txt
0,9
36646
0,4
38833
33882
38849
0,7
36646
main doubt, it is algorithm that I need in this question {I need the logic that must be implemented in the integer function that reads mode 0.9 is note corresponding to the number of the bottom that in case 36646 an integer, soon after comes 0.4 that say new broken number in which corresponds the number 38833,33882,38849 and 0,7 again corresponds to the number 36646 only that 0,7 must be added with 0,9 because both are of the same number}
and when printed will show the number with your corresponding note
as
36646 1,6 //com a nota somada
....
..
.
.
It’s not clear what your question is. Your title asks a question that you answer yourself. Then you mention another definition of problem but no code nor doubt. You’d better edit your question to make it clear what problem you’re having and the solution you’re trying to solve.
– Tiago Gomes
@Tiagogomes at a glance at the issue see if understood, focus on the bold part in the italics section of the question.
– Vale
Rodolfo, in the "bold part" you ask for the algorithm, and I find it difficult for someone to do it for you. The purpose of the site is to answer concrete and objective questions, and not to do your homework for you. Why not edit the question and focus on a specific question (for example, how do you actually identify whether a number is integer or not? or, how do you store and access a value mapped by a key? - in your case, the registration ID - and so on). Make it easy for you to get an answer, and then you can open up new questions for any other questions you have.
– Luiz Vieira