30 Topics

Member Avatar for
Member Avatar for fuyulight

*how program to display this triangle??? >_<* > ***** > **** > *** > ** > * > * > ** > *** > **** > ***** (just the triangle..)

Member Avatar for Üzåír
0
21K
Member Avatar for fatalaccidents

Hello all, I'm hoping this is related enough to python to merit being posted here. I'm hoping someone will possibly have a better way of doing it altogether. I'm using tetgen to try to create a hollow dome. I was using triangle and then just triangulating a circle and raising …

Member Avatar for fatalaccidents
0
2K
Member Avatar for Emma_3

Everything works fine, but the outputted numbers are supposed to be asterisks instead of digits. Ideas? #include <iostream> using std::cout; using std::cin; int main () { int number = 0; char star = '*', stars = '*'; cout << "Please enter a base number to create the triangle: "; cin …

Member Avatar for samson.dadson.3
0
252
Member Avatar for marc.orocay

can someone give me an example that draws right triangle using asterisk using do-while loop only (without using for loop)

Member Avatar for tinstaafl
-2
181
Member Avatar for marc.orocay

can someone help me, I need a program like this but it **must not use for loop**. or can someone revise it using **do loop**? I need it badly #here is the code: { int n, i, j; do{ printf("Enter a positive int n: "); scanf("%d",&n); } while (n < …

Member Avatar for NathanOliver
-2
217
Member Avatar for Lindita01

Given a length of wire P units long, where P is an integer, it is possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are also integers. For example a wire of length P = 3 units …

Member Avatar for peter_budo
0
149
Member Avatar for Maryooma1

1. Given a length of wire P units long, where P is an integer, it is possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are also integers. For example a wire of length P = 3 …

Member Avatar for JamesCherrill
0
198
Member Avatar for jose.a.rueda.5

hi! i have a program in C++ that produces a right triangle of character and i need the same program, i mean a program that makes the same function, but in C. This is my program in C++ : #include <iostream> using namespace std; int main() { int i,j; char …

Member Avatar for mridul.ahuja
0
231
Member Avatar for ashley9210

I am trying to make this pattern in python but stuck, any help please? Ashley http://images.colourbox.com/thumb_COLOURBOX3492089.jpg

Member Avatar for Gribouillis
0
145
Member Avatar for ashley9210

Hi there, I am trying to repeat my triangle on 100px by 100px; Any help is much appreciated. Many thanks, Ashley def drawTrianglePatch(win, x, y, colour): for i in range(5): for j in range(5): if (i + j) % 2 == 0: triangle = i * 20 triangle = y …

Member Avatar for woooee
0
491
Member Avatar for bleedi

Hiya! I have a function that creates 3D meshes procedurally from the given parameters. It creates a four-sided box, which is (for example) 1.0 wide, 1.0 high and 100.0 long. The box is then subdivided into multiple parts, so if the aforementioned box is subdivided to three parts, it will …

Member Avatar for Momerath
0
248
Member Avatar for Vish0203

Hello everyone! I tried a lot to understand the spacing procedure in pascal triangle.. but it all went to vein!! Does anyone knows about this spacing??? Why are we using this loop: for(x=40-3*y;x>0;--x) printf(" "); need help ASAP!!

Member Avatar for Vish0203
0
337
Member Avatar for Timziski

Hey everyone, can anyone help me out with a code that creates a program where a user can key in 3 coordinate points and when the click "Generate Triangle" button. the program automatically creates the program. Please help. Cheerz

Member Avatar for kingsonprisonic
0
289
Member Avatar for pwolf

the objective is to create a function to determine, from the three sides of a triangle, whether it is isosceles or not. I wrote the following code, yet its not very efficient, how could i have done this better? and is there anything wrong with this code? i tested it …

Member Avatar for TrustyTony
0
3K
Member Avatar for sk8ergirl

I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 …

Member Avatar for NormR1
0
500
Member Avatar for sk8ergirl

I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 …

Member Avatar for NormR1
0
702
Member Avatar for maynardjk13

Greetings! I have an assignment for my CSE class that requires me to write a program that prints out an isosceles triange made of asterisks. The program reads in the number of rows from the user and prints out a triangle with that amount of rows. The following functions were …

Member Avatar for WaltP
0
171
Member Avatar for jhudielpeco

Please repair my loop. [CODE]#include <iostream> using namespace std; int main(){ int size; cout << "How large a triangle do you want? "; cin >> size; for (int r = 0; r < size; r++) { for (int c = 1; c <= size; c++) { if (c <= r) …

Member Avatar for WaltP
0
132
Member Avatar for paulsoncall

Hi - I'm having a hard time figured out how to print the triangle shape below using loops. I did the two previous triangles with no issue but have no idea how to get the spaces in there. I'm really confused and would appreciate any help. [CODE] * ** *** …

Member Avatar for paulsoncall
0
258
Member Avatar for konman795

Hi everybody, I have been having trouble with the output of a set of points for my triangle program. When I run my program, it outputs in the end "triangle1 coordinates: Vertex A is java.awt.Point[x=12,y=13]" and I have no idea how to format it to hide the "[B]java.awt.Point[/B]" part. Any …

Member Avatar for konman795
0
313
Member Avatar for PurpleHeaven

Hello guys I need some help about the Pascal's Triangle. It's not about showing an output of the triangle itself but it's a little different. The user will be asked to choose a row number in the triangle. After that, it will output the sum of all the values above …

Member Avatar for Taywin
0
213
Member Avatar for larrymtl

Hello, somehow my program passes directly to else statement after [QUOTE]System.out.println("Would you like to draw another triangle? (Yes/No): ");[/QUOTE] something is wrong with if statement at the end...please help [CODE] import java.util.*; public class Triangle { public static void main (String [] args) { System.out.println("Welcome to the Triangle Program"); int …

Member Avatar for larrymtl
0
209
Member Avatar for infiniteloop56

Hey everyone, I am new to this site, basically my problem is this: The user inputs an integer, and then the user inputs a character, the program is supposed to make a triangle out of the character, with the max width of the user inputed integer. for example; user inputs …

Member Avatar for goldzero
0
1K
Member Avatar for iamuser_2007

i see this code in this thread, i want to know how to get input by user or from file in this code. for example this list how to use it as input in this code. i don't know how to modify and how to use it. Daniweb thread reference …

Member Avatar for iamuser_2007
0
187
Member Avatar for cufisa

Hello there everyone. I am in need of assistance in writing a code for my program. What I have to do is write a code to generate the following: (1) * ** *** **** ***** (2) ***** **** *** ** * (3) ***** **** *** ** * (4) * ** …

Member Avatar for aamira_s
0
157
Member Avatar for george61

In the following problem I have to find the number > 40755 which is triangular,pentagonal and hexagonal. The formulas for these type of numbers are given below. As I read every hexagonal number is also triangular so we have to compare pentagonal with hexagonal numbers. This algorithm gives 9 digit …

Member Avatar for george61
0
866
Member Avatar for george61

In these problem I have to find triangular number by the number of it's divisors. The program takes about 0.65 seconds to find the first triangular number with >100 divisors and about 87 seconds for the number with >200 divisors which means that my algorithm is very inefficient. Any help …

Member Avatar for Momerath
0
519
Member Avatar for TrustyTony

I have left my source of information as docstring comment on code side. If you want to solve the problem yourself do not run the code. This code actually gives the correct answer. I have not reacted to the border case comment in my formula source as it is quite …

0
1K
Member Avatar for MasterMic

I've taken 1 course in Java and 1 in C++ and now I'm tinkering with Python (love it so far). My module I'm currently working on is designed to solve a certain puzzle. To understand the code you'll need to understand the puzzle: There is an upside down triangle with …

Member Avatar for MasterMic
0
269
Member Avatar for bookmark

Hi, I have this program that outputs a triangle when given the size. Right now the triangle outputs like this [CODE] 5 * ** *** **** ***** [/CODE] Does anyone know how I would make it look like this? [CODE] 5 1 12 123 1234 12345 [/CODE] Thanks in advanced …

Member Avatar for bookmark
0
212

The End.