Click here to Skip to main content
15,885,278 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Converting from MFC to Native Windows C Pin
Richard MacCutchan13-May-22 0:29
mveRichard MacCutchan13-May-22 0:29 
GeneralRe: Converting from MFC to Native Windows C Pin
ForNow13-May-22 1:34
ForNow13-May-22 1:34 
GeneralRe: Converting from MFC to Native Windows C Pin
Richard MacCutchan13-May-22 2:05
mveRichard MacCutchan13-May-22 2:05 
GeneralRe: Converting from MFC to Native Windows C Pin
ForNow13-May-22 3:10
ForNow13-May-22 3:10 
GeneralRe: Converting from MFC to Native Windows C Pin
Richard MacCutchan13-May-22 3:48
mveRichard MacCutchan13-May-22 3:48 
Questionmy problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Member 1563347212-May-22 0:17
Member 1563347212-May-22 0:17 
AnswerRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
OriginalGriff12-May-22 0:26
mveOriginalGriff12-May-22 0:26 
QuestionRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Member 1563347212-May-22 0:43
Member 1563347212-May-22 0:43 
i try for loop you suggest

code:

#include <stdio.h>
	# define POUNDTOKG  0.453592;


int main()
{
    int i,j;
       float pound, kilogram;

    printf("Pound --------- Kilos\n\n");
    
    
for (int i = 0; i <= 300; i++)
    {
    for (int j = 1; j <= 100; j++)
        {
        kilogram = pound * POUNDTOKG;      
        
        }
        printf("%.2f pound = %.2f Kilogram\n", pound, kilogram);
    }
    return 0;
}

but my expected output is like this,

======================
Pounds               Kilos
======================
100.00                 45.45
101.00                 45.91
120.00                 46.36
103.00                 46.62
104.00                 47.27
105.00                  ........
.
.
.
300.00                 136.08

but thanks

AnswerRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Richard Deeming12-May-22 0:54
mveRichard Deeming12-May-22 0:54 
AnswerRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Michael Hulthin12-May-22 1:06
Michael Hulthin12-May-22 1:06 
GeneralRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Member 1563347212-May-22 1:21
Member 1563347212-May-22 1:21 
GeneralRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Member 1563347212-May-22 1:44
Member 1563347212-May-22 1:44 
GeneralRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Michael Hulthin12-May-22 1:59
Michael Hulthin12-May-22 1:59 
GeneralRe: my problem is output for this weight conversion pounds to kilogram that starts from 100 to 300. Pin
Member 1563347212-May-22 2:16
Member 1563347212-May-22 2:16 
Questionhow to capture mouse movement and click in windows service Pin
Shkuratov U11-May-22 16:57
Shkuratov U11-May-22 16:57 
AnswerRe: how to capture mouse movement and click in windows service Pin
Richard MacCutchan11-May-22 21:43
mveRichard MacCutchan11-May-22 21:43 
AnswerRe: how to capture mouse movement and click in windows service Pin
Richard Deeming11-May-22 21:44
mveRichard Deeming11-May-22 21:44 
Questionconflicting types for 'uint32_t' issue Pin
focusdoit5-May-22 3:17
focusdoit5-May-22 3:17 
AnswerRe: conflicting types for 'uint32_t' issue Pin
Richard MacCutchan5-May-22 4:02
mveRichard MacCutchan5-May-22 4:02 
AnswerRe: conflicting types for 'uint32_t' issue Pin
Randor 5-May-22 9:28
professional Randor 5-May-22 9:28 
GeneralRe: conflicting types for 'uint32_t' issue Pin
focusdoit5-May-22 14:04
focusdoit5-May-22 14:04 
GeneralRe: conflicting types for 'uint32_t' issue Pin
Randor 5-May-22 14:31
professional Randor 5-May-22 14:31 
GeneralRe: conflicting types for 'uint32_t' issue Pin
Richard MacCutchan5-May-22 22:23
mveRichard MacCutchan5-May-22 22:23 
QuestionComplier error C2280 explanation Pin
ForNow5-May-22 1:37
ForNow5-May-22 1:37 
AnswerRe: Complier error C2280 explanation Pin
CPallini5-May-22 1:59
mveCPallini5-May-22 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.