Logo 
Search:

C++ Programming Article

Submit Article
Comments on Program to display numeric triangle for user given value
Category: C++ Programming (Beginners)    Author: Easy Tutor

Program to display numeric triangle for user given value.

OUTPUT PROGRAM
1
22
333
......


Teresa Nichols
Teresa Nichols from United StatesNov 13
I am writing a half pyramid reversed from the one above. It will align
like this ##
###
####
#####
and I want to use hashes instead of numbers.
It should print when given a number between 1 and 23
This is what I have so far

#include <stdio.h>
int main (void)
{
printf("Enter an integer for height between 1 and 23"):
scanf ("%d, &n");
for(int i = 0; i < height; i++)
{
is this even close and what do I do now? I need to add a loop
in somehere also....
Thanks,
Teresa


Please enter your Comment
  • Comment should be atleast 15 Characters.
  • Please put code inside [Code] your code [/Code].