Hello,
We have to make a trade in Algo and the statement is as follows:
Building a pyramid star line through the center (a real) music.
Here is what I have done:
But that does not work!Code:1. / / Program used to display a pyramid star in a chosen height, using procedures or functions. 2. 3. # include <iostream> 4. using namespace std; 5. 6. int main () 7. ( 8. int nbEtoile, spaceFill i. hPyramide, j; 9. char answer; 10. 11. do 12. ( 13. do 14. ( 15. court << "Enter the height of the pyramid"; 16. cin>> hPyramide; 17. ) 18. while (hPyramide <= 1); 19. for (i = 1; i <= hPyramide; i + +) 20. ( 21. spaceFill hPyramide =-i; 22. for (i = 1; i <= spaceFill; i + +) 23. ( 24. court << ''; 25. ) 26. nbEtoile = 2 * i-1; 27. for (j = 1 j <= nbEtoile j + +) 28. ( 29. cost <<'*'; 30. ) 31. court << "\ n"; 32. ) 33. 34. court << "yet? y / n"; 35. cin>> answer; 36. ) 37. while (answer == 'o');38. )
If someone could help me in passing.



Reply With Quote
Copyright Techfuels
Bookmarks