### i need your help with 25 min plz

Array F contains Some values of Temperature in Fahrenheit
write a program to read each element of F, calculate and print the corresponding element of array B which should contain the corresponding value of temperature in Celsius

use the following formula for conversion

c= 5(F-32) / 9

A= 3, 5, 12, 15, 21, 34, 47, 56, 68, 77, 85

write a module for the conversion process and call it by value
Last edited on
check this

 ``123456789101112131415161718`` ``````void main() { float F[6] = {3,5,12,32,20,100}; float C[6]; for(int i = 0 ; i < 6 ; i++) { C[i] = 5 * (F[i] - 32) / 9; } for(int i = 0 ; i < 6 ; i++) { cout<
`void main()`

This isn't C++. In C++, main returns an int.
guys plz where is the module ???

i just have few min
and where is the mistake here

#include <iostream>
using namespace std;

void main ()

{

int x, i;

int avg, sum=0;

int Array [] = {34,45,56,38,42,51,53};

x= sizeof(Array)/4;

for (i=0; i<x; i++)

{
sum = sum + Array [i];

}

avg= sum / x;

cout <<"The Addition of the numbers:\n"<<sum<<x<<endl;

cout <<"\nNums of Pre-Enterd value:\n" <<x\n << endl;

cout << "The Avarage of the calculated nums is:\n" << avg << endl;

system ("pause");

}
where is the mistake here

`void main ()` That's not C++
`cout <<"\nNums of Pre-Enterd value:\n" <<x\n << endl; ` ->
`cout <<"\nNums of Pre-Enterd value:\n" <<x << endl; `
where does this 7 come from ?? int the sum ?? 3147
??? why 7 ??

plz how can icall the first one by value??
forget every thing i need to solve the first one pllllzzzzzzzzz
`cout <<"The Addition of the numbers:\n"<<sum<<x<<endl;` ->
`cout <<"The Addition of the numbers:\n"<<sum<<endl;`
to be closed
Topic archived. No new replies allowed.