in this code s is used for spaces & b is used for triangle pattern to form
if you use 10 or any integer there it will not work & will give you a rectangle
since it will repeat again for coming inside loop

I don't know if this code works
since i wrote it using java
plz check if any errors were there
i tried to completely rewrite in c++.
I dont know that too much but still can help you with this

hope i helped you solving your problem

Comments

WaltP:Hope you get a good grade doing his homework for him. Thanks for helping make this the Lazy Student's Dream Site.

If you take a look at what's happening with (c) you'll probably realise that for each line printed the number of spaces is incremented and the number of asterisks decremented. In (d) it's the opposite: for each line the number of spaces is decremented and the number of asterisks incremented.

If you write down the number of spaces and the number of asterisks in each line, you should be able to figure out what to do within the loop.

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...