progam to find the dividend

program is not working i'm newbie in this language please help me

#include <cstdlib>
#include <iostream>

using namespace std;
void compute_dividend()
{
int nc;
float pr;
float br=0.045,bor=0.005,div;
if (nc=0){
div=pr*br*bor;
}
else{
div=pr*br;}

}

void instruct_user()
{
int nc;
float pr;
cout << "Enter your Premium=";
cin >> pr;
cout << "Enter your Claims=";
cin >> nc;

}

int main()
{
float div;
instruct_user();
compute_dividend();
cout << "Your dividend is=" << div;
return 0;
}

Last edited on
Please user code tags.
http://www.cplusplus.com/articles/z13hAqkS/

Looks like you need to return some values from your functions, and pass values to your functions.

this might help.
http://www.cplusplus.com/doc/tutorial/functions/
http://www.cplusplus.com/doc/tutorial/functions2/
Last edited on
it helps thnx
Topic archived. No new replies allowed.