15,843,498 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Member 1563347212-May-22 1:17 Member 15633472 12-May-22 1:17
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. OriginalGriff12-May-22 1:26 OriginalGriff 12-May-22 1:26
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Member 1563347212-May-22 1:43 Member 15633472 12-May-22 1:43
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Richard Deeming12-May-22 1:54 Richard Deeming 12-May-22 1:54
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Michael Hulthin12-May-22 2:06 Michael Hulthin 12-May-22 2:06
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Member 1563347212-May-22 2:21 Member 15633472 12-May-22 2:21
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Member 1563347212-May-22 2:44 Member 15633472 12-May-22 2:44
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Michael Hulthin12-May-22 2:59 Michael Hulthin 12-May-22 2:59
 Well it is, kindof. The format specfier to printf is wrong. Try this ```#include #define POUNDTOKG 0.453592 int main() { printf("Pound --------- Kilos\n\n"); for (int pound = 100; pound <= 300; pound++) { printf("%d pound = %.2f Kilogram\n", pound, pound * POUNDTOKG); } return 0; } Pound --------- Kilos 100 pound = 45.36 Kilogram 101 pound = 45.81 Kilogram 102 pound = 46.27 Kilogram 103 pound = 46.72 Kilogram ... 298 pound = 135.17 Kilogram 299 pound = 135.62 Kilogram 300 pound = 136.08 Kilogram ...Program finished with exit code 0 Press ENTER to exit console.```
 Re: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Member 1563347212-May-22 3:16 Member 15633472 12-May-22 3:16
 how to capture mouse movement and click in windows service Shkuratov U11-May-22 17:57 Shkuratov U 11-May-22 17:57
 Re: how to capture mouse movement and click in windows service Richard MacCutchan11-May-22 22:43 Richard MacCutchan 11-May-22 22:43
 Re: how to capture mouse movement and click in windows service Richard Deeming11-May-22 22:44 Richard Deeming 11-May-22 22:44
 conflicting types for 'uint32_t' issue focusdoit5-May-22 4:17 focusdoit 5-May-22 4:17
 Re: conflicting types for 'uint32_t' issue Richard MacCutchan5-May-22 5:02 Richard MacCutchan 5-May-22 5:02
 Re: conflicting types for 'uint32_t' issue `Randor` 5-May-22 10:28 `Randor` 5-May-22 10:28
 Re: conflicting types for 'uint32_t' issue focusdoit5-May-22 15:04 focusdoit 5-May-22 15:04
 Re: conflicting types for 'uint32_t' issue `Randor` 5-May-22 15:31 `Randor` 5-May-22 15:31
 Re: conflicting types for 'uint32_t' issue Richard MacCutchan5-May-22 23:23 Richard MacCutchan 5-May-22 23:23
 Complier error C2280 explanation ForNow5-May-22 2:37 ForNow 5-May-22 2:37
 Re: Complier error C2280 explanation CPallini5-May-22 2:59 CPallini 5-May-22 2:59
 Re: Complier error C2280 explanation ForNow5-May-22 3:07 ForNow 5-May-22 3:07
 Re: Complier error C2280 explanation CPallini5-May-22 3:10 CPallini 5-May-22 3:10
 Re: Complier error C2280 explanation ForNow5-May-22 3:21 ForNow 5-May-22 3:21
 Re: Complier error C2280 explanation CPallini5-May-22 3:34 CPallini 5-May-22 3:34
 Re: Complier error C2280 explanation ForNow5-May-22 4:01 ForNow 5-May-22 4:01
 Last Visit: 31-Dec-99 19:00     Last Update: 21-Feb-24 1:34 Refresh ᐊ Prev1...67686970717273747576 Next ᐅ