-->

Facebook

Jasper Roberts - Blog

Tuesday, October 14, 2014

write a c program to draw following pattern-7

/*
AAAAA
BBBB
CCC
DD
E
*/

#include<stdio.h>
#include<stdio.h>

void main()
{
    int i, j;
    clrscr();

     for(i=1;i<=5;i++)

write a c program to draw the following pattern-6.

/*
A
AB
ABC
ABCD
ABCDE
*/


#include <stdio.h>

#include <conio.h>

void main()
{
    int i, j;
     clrscr();

Write a c program to draw the following pattern-5.


/*
     12345
      2345
       345
        45
         5
*/


#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

for(i=1;i<=5;i++)
{

The getchar() & putchar() functions

getchar()

-   reads only single character at a time.
-   It can be used in the loop if there is need to read more than one characters from the screen.


putchar() 

-   This function puts only single character at a time.