0

Can some one tell me what is wrong with this code?this code is giving me error in the cs50ide.

    #include<stdio.h>
#include<cs50.h>
int main(void)
{
    int i,height,n=1;
    do
    {
        printf("height:");
        height=GetInt();
        if(height==0)
        return 0;
    }while(height<1 || height>23);
while(n<=height)
{
    for(i=0;i<(height-n);i++)
    printf(" ");
    for(i=0;i<(n+1);i++)
    printf("#");
    printf("\n");
    n=n+1;
}

}
5
  • your program is correct, can you say what is the error? – MARS Jul 31 '16 at 12:52
  • when I check using check50,i get the message: – Souraj Adhikary Jul 31 '16 at 13:59
  • it may be the case of a temporary malfunction of chek 50, there have been many messages in this regard – MARS Jul 31 '16 at 14:07
  • I am sorry for the trouble. It was a temporary glitch. – Souraj Adhikary Jul 31 '16 at 14:13
  • Glad you found the problem. Can you add the result as an answer and accept it so that it is removed from the unanswered question pool please? thanks. – Cliff B Aug 1 '16 at 23:35

You must log in to answer this question.

Browse other questions tagged .