Monday, July 2, 2018

C program to draw a Digonal of entered numbre

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>

void staircase(int n) {
   
    char c='#';


        for(int j=n;j>0;j--)
      { printf("%*c\n",j,c);

      }


}

int main() {
    int n;
    scanf("%i", &n);
    staircase(n);
    return 0;
}

No comments:

Post a Comment

Derivatives stock list at NSE

Complete FNO stock list at NSE. ABB India Ltd ACC Ltd APL Apollo Tubes Ltd AU Small Finance Bank Ltd Aarti Industries Ltd Abbott India Ltd A...