Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,782 members, 7,806,165 topics. Date: Tuesday, 23 April 2024 at 12:18 PM

C++ Function Call Question - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / C++ Function Call Question (589 Views)

Nairaland Login Function Is Faulty! / Javascript:how Do I Use drawBox Function.. / Brain Teaser: Recursive Anonymous Function Expression Analysis (2) (3) (4)

(1) (Reply) (Go Down)

C++ Function Call Question by Emmoa(m): 4:25am On Jun 06, 2020
Anyone who can help answer this c++ question of using functions.
Re: C++ Function Call Question by Tim1212(m): 6:59am On Jun 06, 2020
Very easy, drop your email

1 Like

Re: C++ Function Call Question by Emmoa(m): 12:06pm On Jun 06, 2020
Tim1212:
Very easy, drop your email

Yes yes!!!!!Thank you so much. I truly appreciate.

1 Like

Re: C++ Function Call Question by iAmTheJoker: 12:02am On Jun 07, 2020
//Hey!.. i tried solving it, i think it might be correct

#include <iostream>
#include <cmath>
using namespace std;


float Rformular();

float R; // radius
float V; // velocity square

float Rformular (float* v, float* o )
{
V = pow(*v,2);
float g = 9.81;
R = V/(g*tan(*o));
return R;

}// radius formular

int main()
{
float v; //velocity
float o; //teetar
float m; //mass

cout << "input velocity" << endl;
cin >> v; // input for tangential velocity
cout << "input value for teetar" << endl;
cin >> o; //input for teetar
cout << " input value for mass"<< endl;
cin >> m; // input for mass

float R = Rformular(&v,&o);
V = pow(v,2);
float L = ((m * V)/R)/sin(o);// calculating force
cout << L << "N"<< endl ;
}

2 Likes

Re: C++ Function Call Question by Emmoa(m): 1:59pm On Jun 07, 2020
iAmTheJoker:
//Hey!.. i tried solving it, i think it might be correct

#include <iostream>
#include <cmath>
using namespace std;


float Rformular();

float R; // radius
float V; // velocity square

float Rformular (float* v, float* o )
{
V = pow(*v,2);
float g = 9.81;
R = V/(g*tan(*o));
return R;

}// radius formular

int main()
{
float v; //velocity
float o; //teetar
float m; //mass

cout << "input velocity" << endl;
cin >> v; // input for tangential velocity
cout << "input value for teetar" << endl;
cin >> o; //input for teetar
cout << " input value for mass"<< endl;
cin >> m; // input for mass

float R = Rformular(&v,&o);
V = pow(v,2);
float L = ((m * V)/R)/sin(o);// calculating force
cout << L << "N"<< endl ;
}
Thank you so much.God bless . I will run the code
Re: C++ Function Call Question by Christianchinyz: 12:42pm On Jan 04, 2023
Hello how are you now

(1) (Reply)

I Need A Programmer To Build A Rebranded Version Of This Website. / Get Notified Of SARS Locations In Real Time / Developer Needed

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.