Isosceles Triange Programming Software Development by cookiemonstah I need help on making an isosceles triangle 2sides with 5 asterisks, and a base with 9 … this: * * * * * * * ********* Anyone can help me supply the codes for the isosceles triangle with no asterisks inside the triangle? Help would be… An Isosceles Triangle using nested loop Programming Software Development by RaigaX9 … help with this program here. I want to print an isosceles triangle. But, I keep ending up with this here where… Re: An Isosceles Triangle using nested loop Programming Software Development by gangsta1903 whats the problem? this code already prints an isosceles triangle? Re: An Isosceles Triangle using nested loop Programming Software Development by gangsta1903 [QUOTE=gangsta1903;1144478]whats the problem? this code already prints an isosceles triangle?[/QUOTE] sorry... now I see that you are complaining about spaces... your are incrementing the asteriks one by one in every line.. if you dont want spaces, then you should go with 1-3-5-7-9... asteriks on each line.... Print an isosceles triangle Programming Software Development by maynardjk13 … requires me to write a program that prints out an isosceles triange made of asterisks. The program reads in the number… Function to determine whether or not a triangle is Isosceles. Programming Software Development by pwolf …, from the three sides of a triangle, whether it is isosceles or not. I wrote the following code, yet its not… Help needed for prinitng isosceles trianlge Programming Software Development by arslan.haroon Hey! I am stuck on a problem in which i have to print an isosceles triangle (two sides equal) with any character. It would be really helpful if someone could tell me the code, the triangle should look like this: * *** ***** ******* Re: Isosceles Triange Programming Software Development by sfuo The solution is in the if() statement where it prints either a * or space. You should use the C++ headers if you are using C++ ( you were using iostream.h instead of iostream ). And you should practice formatting your code so it is easier to read because you have cout << "\n"; tabbed out by cout << " "; which kinda… Re: An Isosceles Triangle using nested loop Programming Software Development by RaigaX9 [QUOTE=gangsta1903;1144480]sorry... now I see that you are complaining about spaces... your are incrementing the asteriks one by one in every line.. if you dont want spaces, then you should go with 1-3-5-7-9... asterisk on each line....[/QUOTE] Nevermind, I sort of did read the directions of the homework my professor has given us incorrectly… Re: An Isosceles Triangle using nested loop Programming Software Development by gangsta1903 [QUOTE=ZetaX9;1144489]Nevermind, I sort of did read the directions of the homework my professor has given us incorrectly. It's suppose to have spaces separating them and I sort of miss reading that part lol. In my professor's website, he forgot to put spaces in that triangle he wanted us to do and I just assumed that he wanted to make it without … Re: An Isosceles Triangle using nested loop Programming Software Development by RaigaX9 [QUOTE=gangsta1903;1144492]oh teachers... :)[/QUOTE] lol. Yeah, I know. Drove me crazy over the weekend. XD Re: Print an isosceles triangle Programming Software Development by WaltP Not necessarily easiest, but it would work just fine. Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by TrustyTony [CODE]def isIsosceles(x, y, z): return x == y or y == z[/CODE] Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by pwolf [QUOTE=pyTony;1737288][CODE]def isIsosceles(x, y, z): return x == y or y == z[/CODE][/QUOTE] hahaha, i just realized that, i learnt some bad habits somewhere. thank you! Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by pwolf [QUOTE=pyTony;1737288][CODE]def isIsosceles(x, y, z): return x == y or y == z[/CODE][/QUOTE] whilst this thread is open, could you help me with another problem? this time i am to determine whether its scalene or not, so i wrote; [CODE] def isScalene(x, y, z): if x <= 0 or y <=0 or z <=0: return False elif x == y or… Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by Gribouillis [QUOTE=pwolf;1737303]whilst this thread is open, could you help me with another problem? this time i am to determine whether its scalene or not, so i wrote; [CODE] def isScalene(x, y, z): if x <= 0 or y <=0 or z <=0: return False elif x == y or x == z: return False else: return True [/CODE] but its not being accepted. … Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by pwolf def isScalene(x,y,z): if x == y or x == z or y == z: return False elif x <= 0 or y <=0 or z <= 0: return False else: return True Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by Gribouillis [QUOTE=pwolf;1738056]def isScalene(x,y,z): if x == y or x == z or y == z: return False elif x <= 0 or y <=0 or z <= 0: return False else: return True[/QUOTE] It works, only it's better to raise an exception if one of x, y, z is < 0, because there is no triangle with x = -1 for example. Actually, the function [code=python] def … Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by pwolf [QUOTE=Gribouillis;1738065]It works, only it's better to raise an exception if one of x, y, z is < 0, because there is no triangle with x = -1 for example. Actually, the function [code=python] def isValidTriangle(x, y, z) return abs(x-y) <= z <= x + y [/code] suffices, because if this it returns True, then z >= 0 and also x - y… Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by TrustyTony [QUOTE]if one of x, y, z is < 0 [/QUOTE]This is also expressible more obviously as: [code=python] def is_valid_triangle(*sides): return len(sides) == 3 and min(sides) > 0 [/code] Also your function return False for 39, 4, 874 and 14, 64, 82 and as you are missing also : at end of def line, I assume you had not chance to test the … Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by Gribouillis 39, 4, 874 and 14, 64, 82 are not valid triangles ! Try to draw them ! There is another way to write the function [code] def isValidTriangle(x, y, z): return min(x+y-z, y+z-x, z+x-y) >= 0 [/code] Ever heard of the triangle inequality ? Re: Function to determine whether or not a triangle is Isosceles. Programming Software Development by TrustyTony Ok, so you more far than OP, I do not think the mathematical validity was required for OP. Triangle inequality with positiveness I understand more easily in form: [CODE]def is_valid_triangle(x,y,z): return x + y >= z > 0 and y + z >= x > 0 and x + z > y [/CODE] I assume that you mean by flat triangle with 'triangle' with one or… Re: Help needed for prinitng isosceles trianlge Programming Software Development by deceptikon This is an excercise for you to learn. Being given the code only teaches you to beg for freebies. It's not a difficult exercise, please make an honest attempt and then if you have problems feel free to ask about them. Re: Help needed for prinitng isosceles trianlge Programming Software Development by NathanOliver Ill give you a hint. You will need to use 2 for loops. Re: Help needed for prinitng isosceles trianlge Programming Software Development by hariskhank { for(int x=1; x<=5; x++) for(int y=1; y<=5; y++) cout<<"*\n"; some thing like this do correct it and try . Re: Classes Programming Software Development by jonsca Isosceles triangles have 2 equal sides, equilateral triangles have 3 equal sides. Therefore, what can be said about equilateral triangles? Determine whether or not there is a relationship between right angle triangles and either of the other two. Write out your thoughts and someone will be able to tell you if they are correct. Triangles Programming Software Development by Spagett912 … namespace std; namespace triangles { enum triangleType {scalene, isosceles, equilateral, noTriangle}; // declares the different types of …." << endl; break; case isosceles: cout << "\nAt least two… cout << "and thus form an ISOSCELES TRIANGLE." << endl; break; case… Re: Triangles Programming Software Development by Spagett912 … namespace std; namespace triangles { enum triangleType {scalene, isosceles, equilateral, noTriangle}; // declares the different types of …." << endl; break; case isosceles: cout << "\nAt least two… cout << "and thus form an ISOSCELES TRIANGLE." << endl; break; case… triangles Programming Software Development by superchica08 … triangleType, that has the values scalene, isosceles, equilateral, and notTriangle. so the problem …> using namespace std; enum triangleType{scalene, isosceles, equilateral, notTriangle}; triangleType shape; void inputTriangle(int… == L2 || L2 == L3 || L1 == L3) shape = isosceles; else if (L1 == L2 && L2 == L3) … Help...... Programming Software Development by Maryooma1 … possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all… integer length of the two equal length sides of an isosceles triangle, b is the integer length of the other side…-zero values (a,b,A) when there is ONLY ONE isosceles triangle which has both integer length sides, and integer area…