Happy Birthday program.

0
The second program is like this ....
Happy    Birthday
       Akshay
In this program we used the syntax\n and\t. \n for choosing next line and\t We used for moving horizontal line. So we make a program for print happy birthday Akshay .and here is the code.



INPUT:
  1. #include<stdio.h>
  2. #include<conio.h>
  3. void main ( )
  4. {
  5. clrscr ( );
  6. printf ("Happy \t Birthday \n \t Akshay");
  7. getch( );
  8. }
Output:

Happy     birthday
       Akshay

Write the code you just saw above in your turbo and your output will be same.

Read the code written in this code carefully, you will see that what you have tried to print in the code is getting printed.

 In this statement what you have used \t means tab and it takes the word to a permanent place and what you have used \n means new line which writes the word in new line

Post a Comment

0Comments
Post a Comment (0)