 <p>You do the math before you read the input. You need to do it the other way around.</p> <p>Also, there's no reason to pass a meaningless and uninitialized value to the <code>celsius</code> function.</p> <p>Lastly, <code>180/100</code> is 1 remainder 80 because when you divide two integers, you get integer division. You can use <code>180.0/100.0</code>.</p> <p>Basically, you need to learn C.</p>