C-the C Answer (2nd Edition)-Exercise 1-4

Source: Internet
Author: User

/*write a program-to-print the corresponding Celsius to Fahrenheit table.*/#include <stdio.h>/* print Celsius-fahren Heit table for Celsius = 0, 20, ..., 300; Floating-point version */main () {    float Fahr, celsius;    int lower, upper, step;        lower = 0;   /* Lower limit of temperature table */    upper = +,/* Upper Limit                      */    step  =;  /* Step Size                        *        /printf ("Celsius fahr\n");    Celsius = lower;    while (Celsius <= Upper)    {    Fahr = (9.0 * Celsius)/5.0 + 32.0;    printf ("%3.0f%6.1f\n", Celsius, Fahr);    Celsius + = step;    }} /* Output:celsius Fahr  0   32.0   68.0 104.0  212.0120 140.0 176.0100  248.0140  284.0160  320.0180  356.0200  392.0220  428.0240  464.0260  500.0280  536.0300  572.0Press any key to continue ... */

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

C-the C Answer (2nd Edition)-Exercise 1-4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.