445,798 Members | 1,766 Online
Need help? Post your question and get tips & solutions from a community of 445,798 IT Pros & Developers. It's quick & easy.

# New c++ learner

 P: 1 My tutor has given me an assignment but i'm not good with the syntax can someboby kindly solve this problems for me. 1. Write a program to to test whether given three integer values, the vaules represents the sides of a valid triangle. 2. Write a program to accept money in shillings and determine the change to be given in denominations of 100, 50,20,10, and 5 shilling denominations This is my attempt to 1 // Program to test whether three integer values represent the sides of a valid triangle #include using namespace std; int main () { int a, b, c; cout<<"Enter the three vaules"; c>>a; c>>b; c>>c; ifa=0||b=0||c0; cout<<"It is not a valid triangle, enter the three values again"; c>>a; c>>b: c>>c; if(a+b)>(c)&&(a+c)>(b)\$\$(b+c)>(a) cout<<"This is a valid triangle"; else cout<<"Not a triangle"; return 0 } Oct 4 '06 #1