Programming in ANSI C - Balagurusamy (Solutions With Flowchart & Programs)

Publish in

Documents

200 views

Please download to get full document.

View again

of 227
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
CHAPTER 1 11/03/2010 1.1 Write a program that will print your mailing address in the following form : First line Second line Third line : Name : Door No, Street : City, Pin code Vishal Shah Digitally signed by Vishal Shah DN: cn=Vishal Shah Date: 2012.07.20 21:58:47 +05'30' Algorithm: Algorithm to print your mailing address. Step 1 Step 2 Step 3 : Display your Name and Go to new line. : Display your Door No and Street and Go to new line. : Display your City and Pin Code. Flowchart:START D
Tags
Transcript
   CHAPTER 1 11/03/2010 1.1   Write a program that will print your mailing address in the following form : First line : Name Second line : Door No, Street Third line : City, Pin code   Algorithm: - Algorithm to print your mailing address. Step 1 : Display your Name and Go to new line. Step 2 : Display your Door No and Street and Go to new line. Step 3 : Display your City and Pin Code. Flowchart:- Program: - // Write a program that will print your mailing //address in the following form: //First line : Name //Second line : Door No, Strret //Third line : City, Pin Code //Date : 11/03/2010   START Display your Name & Go to new line Display your Door  No and Street & go to new line Display your City and Pin Code END Vishal Shah Digitally signed by Vishal Shah DN: cn=Vishal Shah Date: 2012.07.20 21:58:47 +05'30'   #include<stdio.h> #include<conio.h> void main() { clrscr();  printf( Name :-- Ritesh Kumar Jain\n );  printf( Door No :-- 57 , Street :-- Parkho Ki Gali\n );  printf( City :-- Nimbahera , Pin Code :-- 312601 ); getch(); } Output:--  Name :-- Ritesh Kumar Jain | Door No:-- 57, Street:- Parkho Ki Gali City:-- Nimbahera, Pin Code:-- 312601 1.2   Modify the above program to provide border lines to the address. Algorithm: - Algorithm to provide border lines to address. Step 1 : Display ------------------------------------------------- line and Go to new line. Step 2 : Display ------------------------------------------------- line and Go to new line. Step 3 : Display ||, your Name, || and Go to new line. Step 4 : Display ||, your Door No and Street, || and Go to new line. Step 5 : Display ||, your City, Pin Code, || and Go to new line. Step 6 : Display ------------------------------------------------- line and Go to new line. Step 7 : Display ------------------------------------------------- line. Flowchart :-   START Display ------------ & go to new line Display ------------ & go to new line A   Program:- // Write a program that will print your mailing //address in the following form: //----------------------------------------- //----------------------------------------- //|| First line : Name || //|| Second line : Door No, Strret|| //|| Third line : City, Pin Code || //----------------------------------------- //----------------------------------------- //Date : 11/03/2010 #include<stdio.h> #include<conio.h> void main() { clrscr();   Display ||, your Name, || & go to new line Display ||, your Door No and Street, || & go to new line Display ||, your City and Pin Code, || and go to new line A END Display ------------ & go to new line Display ------------   printf( -----------------------------------------------\n );  printf( -----------------------------------------------\n );  printf( || Name :-- Ritesh Kumar Jain ||\n );  printf( || Door No :-- 57 , Street :-- Parkho Ki Gali ||\n );  printf( || City :-- Nimbahera , Pin Code :-- 312601 ||\n );  printf( -----------------------------------------------\n );  printf( -----------------------------------------------\n ); getch(); } Output:- --------------------------------------------------- --------------------------------------------------- || Name :-- Ritesh Kumar Jain || || Door No:-- 57, Street:- Parkho Ki Gali|| ||City:-- Nimbahera, Pin Code:-- 312601 || --------------------------------------------------- --------------------------------------------------- 1.3   Write a program using one print statement to print the pattern of asterisks as shown below : * * * * * * * * * * Algorithm: - Algorithm to print the pattern of pattern of asterisks. Step 1: Display * and go to new line Step 2: Display * * and go to new line. Step 3: Display * * * and go to new line. Step 4: Display * * * * Flowchart:- Program :-   START Display * & Go to new line Display * * & go to new line Display * * * & go to new line Display * * * * END
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x