Hello,
Actually i am looking for fuction call for my client side but keep continuing problem with function call & i saw an error with C2059 "syntax error" when i made my programme.
looking for help kindly let me know about this.Code:#include <iostream> #include <cmath> #include <iomanip> using namespace std; int math (double cartons, double totalcost, double totalprofit, double milkprofit, double cost); int main() { int math; char cartons,totalcost,totalprofit,milkprofit,cost; math= cartons + totalcost + totalprofit + milkprofit + cost; return (0); } int math() { char ans = 'y'; bool quad_answer = false; do { double LitersMilkProduce; double cartons, totalcost, totalprofit, milkprofit, cost; const double LITERCOST(0.37), CARTONPROFIT(0.27), LITERS_PER_CARTONS= (3.78); cout << "Enter the total number of liters: "; cin >> LitersMilkProduce; cartons = LitersMilkProduce / LITERS_PER_CARTONS; totalcost = LitersMilkProduce * LITERCOST; totalprofit = LITERCOST * CARTONPROFIT; cout << "The total number of liters = " << LitersMilkProduce << endl; cout << fixed << showpoint<< setprecision(2) <<fixed << "Amount of cartons = " << cartons <<endl; cout << "cost of milk is = "; cin >> LitersMilkProduce ; cost = LitersMilkProduce * LITERCOST; cout << "profit from milk is ="; cin >> LitersMilkProduce; milkprofit = LitersMilkProduce * CARTONPROFIT; if (quad_answer) cout << endl; cout << "Continue (y/n)? "; cin >> ans; while (ans == 'y'); } return 0; };



Reply With Quote
Bookmarks