Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i< dfood.Count; i++)
- {
- for(int j = 0; j < temp.Count; j++)
- {
- if(temp[j].id == dfood[i])
- {
- food temp2 = temp[j];
- temp2 = temp[j];
- int c = temp2.cal;
- temp2.setCalory((int)(((double)c / 100) * masses[i]));
- result.Add(temp2);
- result[result.Count-1].getInfo();//выводит верную инфу 100%
- }
- }
- }
- foreach (food cal in resulst)
- {
- cal.getInfo(); // не верная инфа
- }
Add Comment
Please, Sign In to add comment