Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
44Activity
0 of .
Results for:
No results containing your search query
P. 1
Data Stuctures Lab Manual

Data Stuctures Lab Manual

Ratings: (0)|Views: 2,832 |Likes:
Published by karthimuthu

More info:

Published by: karthimuthu on Jul 08, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/03/2013

pdf

text

original

 
BIO-DATA
AIM:
To write a C-program to print the bio-data.
ALGORITHM:
Step:1 Start the program.Step:2 Read name, father’s name, city, age.Step:3 Enter the details.Step:4 Print the details.Step:5 Stop the program.
PROGRAM:
#include<stdio.h>#include<conio.h>void main(){char name, fathername, city;int age;clrscr(); printf(“Enter the name:”);scanf(“%s”,name); printf(“\n Enter the father’s name:”);scanf(“%s”,fathername); printf(\n Enter the city”);scanf(“%s”,city); printf(“\n Enter the age:”);scanf(“%d”,&age); printf(“\n Name:%s”,Name); printf(“\n Father’s Name:%s”,fathername); printf(“\n City:%s”,city); printf(“\n Age:%d”,age);getch();}
RESULT:
Thus the C-program to print the bio-data had been executed and the output was verified.
 
FLOWCHART: OUTPUT:
Enter the name: R. Siva Kumar Enter the Father’s name: M. Rajavel.Enter the city: Tiruchengode.Enter the age:21 Name: R. Siva Kumar.Father’s Name: M. Rajavel.City: Tiruchengode.Age: 21
STARTRead name, father name, city, agePrint name, father name, city, ageSTOP
 
AVERAGE OF ‘N’ NUMBERS
AIM:
To write a C-program to find the average of ‘n’ numbers.
ALGORITHM:
Step:1 Start the program.Step:2 Read n.Step:3 Enter the numbers.Step:4 Use for loop with condition i < n find its sum.Step:5 Calculate the average.Step:6 Stop the program.
PROGRAM:
#include<stdio.h>#include<conio.h>void main(){int a[20],i,n;float avg,s=0; printf(“Enter the number of element to be added”);scanf(“%d”,&n); printf(“\n Enter the numbers”);for(i=0;i<n;i++){Scanf(“%d”,&a[i]);}for(i=0;i<n;i++){s=s+a[i];}avg=s/n; printf(“The average of %d numbers=%f”,n,avg);getch();}
RESULT:
Thus the C-program to find the average of n numbers had been written and it is executed.

Activity (44)

You've already reviewed this. Edit your review.
vijaypi liked this
1 thousand reads
1 hundred reads
Geoffrey Tanui liked this
Geoffrey Tanui liked this
Geoffrey Tanui liked this
Jagadish Kumar liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->