C Language Coding
Not what you're looking for?
Design and code an ANSI Standard C program which enhances the code at end of post to do the following:
First using a for loop (with two iterations):
a Ask for a Fahrenheit temperatures from the user .
b Get a Fahrenheit temperatures from the user and to store it in an fArray.
c Convert the temperatures to its Centigrade equivalent and store the temperatures in an Array.
d Display the Fahrenheit temperature from fArray and the Centigrade temperature from cArray.
Then using a while loop (with two iterations):
a Ask for a Fahrenheit temperatures from the user .
b Get a Fahrenheit temperatures from the user and to store it in an fArray.
c Convert the temperatures to its Centigrade equivalent and store the temperatures in an Array.
d Display the Fahrenheit temperature from fArray and the Centigrade temperature from cArray.
ALL the array manipulation (loading it, converting and displaying) must be done using a loop.
This array task points out the advantage of arrays if you imagine that you have two thousand temperatures not two. Imagine declaring, doing the conversion, possibly averaging, and displaying that many variables without using an array.
================
Code to enhance:
#include <stdio.h>
int main()
{
float fahrenheit;
float celsius;
printf("Enter the Fahrenheit temperature as a whole number: ");
scanf("%f",&fahrenheit);
celsius = 5.0/9.0*(fahrenheit - 32);
printf("Fahrenheit temperature %0.2fn",fahrenheit);
printf("Celsius temperature %0.2fn",celsius);
}
Purchase this Solution
Solution Summary
This solution contains a ANSI Standard C program that enhances the code in the posting that can ask and store for Fahrenheit temperatures, covert temperatures to Centigrade equivalent and display temperatures in fArray and cArry.
Purchase this Solution
Free BrainMass Quizzes
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Javscript Basics
Quiz on basics of javascript programming language.
Basic Networking Questions
This quiz consists of some basic networking questions.
C# variables and classes
This quiz contains questions about C# classes and variables.