Thursday, August 28, 2014
program which displays an e-card (Greetings, birthday etc.)
Code
#include<stdio.h>
int main()
{
printf ("\n\n-------------------------------------------------\n");
printf ("|\* * * * * * * * * * * * * * * * * * * * * * * /|\n");
printf ("|\* * * * * * * * * * * * * * * * * * * * * * * /|\n");
printf ("|\* * * * * * * * * * * * * * * * * * * * * * * /|\n");
printf ("|\* * * * * * * Happy Birthday * * * * * * * * /|\n");
printf ("|\* * * * * * * * * * * * * * * * * * * * * * * /|\n");
printf ("|\* * * * * * * * * * * * * * * * * * * * * * * /|\n");
printf ("|\* * * * * * * * * * * * * * * * * * * * * * * /|\n");
printf ("-------------------------------------------------\n");
getch ();
return 0;
}
Output
a calendar program using the current month
Code
#include<stdio.h>
int main()
{
printf ("Sun\tMon\tTue\tWed\tThus\tFri\tSat\n");
printf (" \t \t \t \t 1 \t 2 \t 3\n");
printf (" 4 \t 5 \t 6 \t 7 \t 8 \t 9 \t 10\n");
printf ("11 \t12 \t13 \t14 \t 15 \t16 \t 17\n");
printf ("18 \t19 \t20 \t21 \t 22 \t23 \t 24\n");
printf ("25 \t26 \t27 \t28 \t 29 \t30 \t 31\n");
getch ();
return 0;
}
Output
program which displays the Table of two
Code
#include<stdio.h>int main()
{
printf ("2 * 1 = 2\n");
printf ("2 * 2 = 4\n");
printf ("2 * 3 = 6\n");
printf ("2 * 4 = 8\n");
printf ("2 * 5 = 10\n");
printf ("2 * 6 = 12\n");
printf ("2 * 7 = 14\n");
printf ("2 * 8 = 16\n");
printf ("2 * 9 = 18\n");
printf ("2 * 10 = 20\n");
getch ();
return 0;
}
Output
Categories
Popular Posts
-
Advantages and Disadvantages of Assembly Language Let’s discuss few advantages and disadvantages of a level 3 i.e. assembly language. ...
-
Problem Write a menu driven program that depicts the working of a library. The menu options should be: Add book information Display ...
-
If you are interested in writing code on command prompt and like writing code in command prompt than this tutorial is for you. Debugging ...
-
Instructions Instructions are statements that execute when we assemble the program. The instructions (written in assembly language) are ...
-
Problem Write a menu driven program that depicts the working of a library. The menu options should be: Add book information Displa...
-
We already know (from the previous lectures) how an instruction is formed and what the basic structure of an instruction is . Let’s go ...
-
Code #include<stdio.h> int main() { float t,t1,t2,t3; int m1,m2,m3; printf("\nInput notes in hundreds"); scanf(...
-
Description: An Insurance company follows following rules to calculate premium. If a person’s health is excellent and the person is betw...
-
Problem Take two integer inputs from user. Create Sum function which should receive two integers using pointers. Calculate the sum and di...
-
Hint: Area of rectangle = length * breadth Perimeter of a rectangle is the sum of the lengths of all the sides of the re...






