top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to calculate wind chill index for the given temprature and wind speed.

–1 vote
695 views

The wind chill index (WCI) is calculated from the wind speed (v) in miles per hour and the temprature (t) in
fahrenheit . three formulas are used . depending on the wind speed :
if(0<=v<=4)then WCI=t
if(v>=45) then WcI =1.6t-55
otherwise , WCI=91.4 + (0.0203v - 0.304(v)^1/2 - 0.474)

write a program that prompt the user to insert the wind speed (v) in miles per hour format and prompt the user to insert wind temprature on fehrenhite then calculate the wind chill index

posted Nov 18, 2013 by As M Ob

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Providing only the function, I leave creating main function and calling this appropriately to you.

float func_wci(float t, float v)
{
  if ((v >= 0) && (v <=4))
      return t;
  if (v >= 45) 
      return 1.6*t -55;
  else
      return (91.4 + (.0203*v - .304*(v)^.5 - .474));
}
answer Nov 18, 2013 by Salil Agrawal
i want it without function
float v , t , WCI;
    cout<<"please enter value for wind speed in miles per hour "<<endl;
    cin>>v;
    cout<<endl;
    cout<<"please enter value for wind temprature in fehrenhite "<<endl;
    cin>>t;
    cout<<endl;


    if((v>=0) && (v<=4))
   
        WCI = t;
    else if(v>=45)
        WCI=1.6*t-55;
    else
        WCI = 91.4 + (91.4 - t)* (0.0203 * v^(1/2)-0.474);*/


this is true or what ?!!
This is a place where people are doing charity y helping others, so please avoid the problem which you can solve yourself. Alternatively you can invite your friends to join QueryHome so that you can create your own network and your friends can help you with whatever problem you face.

Try this it should work
int main()
{
    double v , t , WCI;
    cout<<"please enter value for wind speed in miles per hour "<<endl;
    cin>>v;
    cout<<endl;
    cout<<"please enter value for wind temprature in fehrenhite "<<endl;
    cin>>t;
    cout<<endl;


    if((v>=0) && (v<=4))    
        WCI = t;
    else if(v>=45)
        WCI=1.6*t-55;
    else
        WCI = 91.4 + (91.4 - t)* (0.0203 * pow(v, .5)-0.474);

    cout << WCI;
    return 0;
}
Similar Questions
+1 vote

How can we calculate the transport block size given the MCS index and the number of used PRBs as defined in the 3GPP table 36.213.

+2 votes

Eg:(())()) - Invalid expression, (()()) - Valid expression?

+3 votes

A number is called as a Jumping Number if all adjacent digits in it differ by 1. The difference between ‘9’ and ‘0’ is not considered as 1.
All single digit numbers are considered as Jumping Numbers. For example 7, 8987 and 4343456 are Jumping numbers but 796 and 89098 are not.

Given a positive number x, print all Jumping Numbers smaller than or equal to x. The numbers can be printed in any order.

Example:

Input: x = 20
Output: 0 1 2 3 4 5 6 7 8 9 10 12

Input: x = 105
Output: 0 1 2 3 4 5 6 7 8 9 10 12
21 23 32 34 43 45 54 56 65
67 76 78 87 89 98 101

Note: Order of output doesn't matter,
i,e., numbers can be printed in any order

...