# 3 Write a general program in C that runs on a PC that converts a li

Content type
User Generated
Rating
Showing Page:
1/4
3. Write a general program in C that runs on a PC that
converts a list of few cities temperatures from
Fahrenheit to degree Celsius and from degree Celsius to
Fahrenheit. The program should also sort the
list of temperatures. The program should be interactive so
that the user can select either convert
(F->C, C->F) or sort options.
a. Develop the specifications based on the requirements
(question itself)
b. Develop the architecture document including all the
design tools.
c. Develop the test plan document
d. Implement the system
Solution
#include <stdio.h>
int size;
float a[100];
void cConvert(){
int i;
for(i=0;i<size;i++)
{
a[i] = (a[i] - 32.0) / 1.8;
}

Showing Page:
2/4
}
void sortT()
{
int i,j;
float temp;
for(i=0;i<(size-1);i++){
for(j=0;i<(size-i-1);j++){
if(a[j]>a[j+1]){
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
}
void fConvert(){
int i;
for(i=0;i<size;i++){
a[i]=1.8*a[i]+32.0;
}
}
int main()
{
int i,ch,e;

Showing Page:
3/4

End of Preview - Want to read all 4 pages?
Access Now
Unformatted Attachment Preview
3. Write a general program in C that runs on a PC that converts a list of few cities’ temperatures from Fahrenheit to degree Celsius and from degree Celsius to Fahrenheit. The program should also sort the list of temperatures. The program should be interactive so that the user can select either convert (F->C, C->F) or sort options. a. Develop the specifications based on the requirements (question itself) b. Develop the architecture document including all the design tools. c. Develop the test plan document d. Implement the system Solution #include int size; float a[100]; void cConvert(){ int i; for(i=0;i ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
Just what I was looking for! Super helpful.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4