Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 131,493 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,817 people online right now. Registration is fast and FREE... Join Now!




Printing a pyramid

 
Reply to this topicStart new topic

Printing a pyramid

prerna_happiness
post 3 Jul, 2006 - 07:49 AM
Post #1


New D.I.C Head

*
Joined: 3 Jul, 2006
Posts: 2


My Contributions


[quote name='print a pyramid of * of 3 row' date='03 july, 2006 - 09:15 PM' ]
Finally!


how to print

*
* *
* * *

the ques is of pyramid but here its is not printing in right way

Is anyone kind enough to help me
User is offlineProfile CardPM

Go to the top of the page


Amadeus
post 3 Jul, 2006 - 08:16 AM
Post #2


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,158



Thanked 31 times

Dream Kudos: 25
My Contributions


Hello,

dream in code has a policy by which we prefer to see a good faith effort on the part of the user before providing any source code in the matter of academic assignments. If you could please post the code you have written in an ttempt to complete the assignment, our members would be more than happy to guide you.

Welcome to the site!

Thanks.
User is offlineProfile CardPM

Go to the top of the page

William_Wilson
post 3 Jul, 2006 - 09:13 AM
Post #3


lost in compilation

Group Icon
Joined: 23 Dec, 2005
Posts: 3,951



Thanked 13 times

Dream Kudos: 3275

Expert In: Java, C, Javascript

My Contributions


*cough* for *cough* loop
User is offlineProfile CardPM

Go to the top of the page

Jayman
post 3 Jul, 2006 - 11:08 AM
Post #4


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,819



Thanked 38 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

My Contributions


QUOTE(William_Wilson @ 3 Jul, 2006 - 09:05 AM) *

*cough* for *cough* loop



LOL, very subtle William_Wilson tongue.gif . Would you like a cough drop?
User is offlineProfile CardPM

Go to the top of the page

madmax
post 5 Nov, 2006 - 11:51 AM
Post #5


New D.I.C Head

*
Joined: 5 Nov, 2006
Posts: 1


My Contributions


QUOTE(prerna_happiness @ 3 Jul, 2006 - 08:49 AM) *

QUOTE(print a pyramid of * of 3 row @ 03 july, 2006 - 09:15 PM)

Finally!


how to print

*
* *
* * *

the ques is of pyramid but here its is not printing in right way

Is anyone kind enough to help me




Hi
change the number.......i<9....for the size of the pyramid you want this one is 9 but change it to 3 for your one hope this helps
madmax
CODE

#include <stdio.h>
    // continue.c

int main(void)
{
    char letter="a";
    char display;
    char output;
        int rows;
    char spaces=' ';
        
    printf("Type a single lowercase letter and press enter:");
    scanf("%c",&letter);

        while((letter<96) || (letter>122))
        {
            if((letter>96) || (letter<122))
            {
                printf("That is not a lowercase letter ("%c", letter), enter a lowercase letter:");
                scanf("%c",&letter);
            }

            else if((letter>96) || (letter<122))
            {
                while(1)
                {
                    letter=letter-32;
                    printf(letter-1);
                    printf("\n\n");
                     spaces=letter-1;
                    putchar(spaces);
                    letter++;
                    spaces++;
                }
            }
            
            
        }    
            
    return 0


EDIT : Added tags - b2c

This post has been edited by born2c0de: 6 Nov, 2006 - 05:01 AM
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/20/08 12:12AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month