Cp1 2012 Batch Printout
Cp1 2012 Batch Printout
Cp1 2012 Batch Printout
Sec: C
DOCUMENT MANIPULATION
Ex.No:1.a Date: Aim: a. b. c. d. To open a new document in Microsoft word. To justify the text To change the text in bold, italic and underlined To save the document
Procedure: a. To open a new document in Microsoft word. 1. Choose Start -> Programs -> Microsoft Word. 2. Open a new document using file -> new option and type the text. 3. Stop b. To justify the text 1. Select Start -> Programs -> Microsoft Word. 2. Press Ctrl + j or press justify button from formatting toolbar. 3. Stop c. To change the text in bold, italic and underlined 1. Select Start -> Programs -> Microsoft Word. 2. Select the text and press Ctrl + B or press bold button from formatting toolbar 3. Select the text and press Ctrl + I or press Italic button from formatting toolbar 4. Select the text and press Ctrl + U or press Underline button from formatting toolbar 5. Stop d. To save the document 1. Select Start -> Programs -> Microsoft Word. 2. Save the document using file -> save or use ALT + F + S or Ctrl + S shortcut keys. 3. Stop.
Name:
Sec: C
TEXT MANIPULATION
Ex.No: 1.b Date: Aim: 1. To align the text in left, right, center in a document. 2. To create a document using bullets and numberings 3. To adjust the font type and font size of the text in a document. Procedure: a. To align the text in left, right, center in a document. Select start -> Programs -> Microsoft Word. Select the text and press Ctrl + L for left alignment or press the left alignment button the formatting toolbar. Select the text and press Ctrl+ R for right alignment or press the right alignment button the formatting toolbar. Select the text and press Ctrl + E for center alignment or press the center alignment button the formatting toolbar. Stop.
b. To create a document using bullets and numberings Select start -> programs -> Microsoft word. Select the text to set the bullets and numberings Set the bullets and numberings from format -> bullets and numberings Stop.
c. To adjust the font type and font size of the text in a document. Select start -> programs -> Microsoft word Select the text to change the font type and font size. Change the font and the size from the format -> font or by right clicking the text and select the font option or font size combo box from formatting toolbar.
Name:
Sec: C
TABLE MANIPULATION
Ex.No: 1.c Date: Aim: a. To insert the table and enter the contents into it. b. To format the table settings c. To convert the text to table. Procedure: a. To insert the table and enter the contents into it. Select start -> Programs -> Microsoft Word. Press table menu from menu bar and then select insert -> table to insert the table. Enter the number of required rows and columns for the table. Enter the text into the cells of the table.
a. To format the table settings Select start -> Programs -> Microsoft Word. Select the table and then select table -> table auto format and change the table format. Stop.
b. To convert the text to table. Select start -> Programs -> Microsoft Word. Enter the text and use separator such as comma or tab for columns and use enter for rows. Select the text which is to be converted into table. Enter the number of columns needed. Stop.
Name:
Sec: C
Name:
Sec: C
Name:
Sec: C
CHART PREPARATION
Ex.No: 5.a Date:
BAR CHART
Aim: To draw a bar chart to compare the sales of 2 companies for the given values Year/Company 2000 ABC BCD Procedure: 1. Choose Start -> programs -> Microsoft Excel 2. Create a new spreadsheet and save it as Bar.xls 3. Enter the data into the cells 4. Select the cells containing the data that has to be displayed in the chart 5. Click insert and choose chart 6. Select the chart type as Bar that has to be created 7. Select the chart design in chart sub-type, then click next. 8. Again click next to add chart, x-axis and y-axis titles. 9. To add title click on the titles tab from chart option dialog box. 10. Type the titles for the chart, x-axis and y-axis and then click next. 11. Click finish and save the spreadsheet 12. Close the excel sheet. 5000 2000 2001 1000 6500 2002 7000 4000 2003 3500 6000
Name:
Sec: C
PIE CHART
Ex.No:5.b Date: Aim: To draw a pie chart for energy contents of the spinach for the below given values. Energy Protein Carbohydrates Vitamins Procedure: 1. 2. 3. 4. 5. 6. 7. 8. 9. Choose Start -> programs -> Microsoft Excel Create a new spreadsheet and save it as pie.xls Enter the data into the cells Select the cells containing the data that has to be displayed in the chart Click insert and choose chart Select the chart type as pie that has to be created. Select the chart design in chart sub-type, then click next. To add title click on the titles tab from chart option dialog box. Close the excel sheet. 30% 45% 25% Percentage
Name:
Sec: C
EXAMINATION DATABASE
Ex.No: 6.a Date: Aim: To create a suitable examination database and to find the sum of the marks of each student and respective class secured by the student and to display the average marks of the class, subject - wise and pass percentage. Procedure: 1. 2. 3. 4. Choose Start -> programs -> Microsoft Excel create a new spreadsheet enter the data into the cells select the appropriate data & choose the function Average to perform the average of summation 5. use the logical function OR to find out the status (i.e.) IF ((B2<35), FAIL, IF (C2<35), FAIL, IF (D2<35), FAIL, IF (E2<35), FAIL, IF (H2>=75,DISTINCTION,PASS))))) 6. Then by using if function state the result is Distinction, pass or fail. (i.e.) IF (H2, Pass, Fail) 7. End of the program
Name:
Sec: C
NETPAY CALCULATION
Ex.No: 6.b Date: Aim: To calculate HRA, DA, PF, LIC, GPF, TA, Gross salary, Deduction, and Net Salary for given basic pay of Employees. Name AJIT RAHUL RAVI SENTHIL SHYAM HRA = 10% DA = 20% PF = 20% LIC = 12% GPF = 10% TA = 20% Procedure: 1. 2. 3. 4. 5. 6. 7. 8. Choose start -> programs -> Microsoft Excel Create a new spreadsheet and save it as salary.xls Enter the data into the cell under the corresponding headings Click on the next Adjacent cell i.e. C1 and type label HRA and type the other Labels correspondingly. Click on the cell C2 and type =B2*10% and press <ENTER>. Apply the same Formula to all employees. Click on the corresponding cells and type the corresponding formula for calculating DA, TA, PF, LIC, PF, GPF, DET, Gross salary, Net salary. Save the Spreadsheet Close the Excel sheet. 15000 6000 20000 5000 16000 Basic Salary
Name:
Sec: C
SORTING
Ex.No: 7 Date: Aim: To enter the following data into the worksheet using Data -> Form command and to sort data by salary within the department using sort command and also to calculate the total salary of each department using auto filter. Name Muni Lak Suri Damu Sudha Kutti Chaitu Prasanna Chinni Lachi Procedure: 1. Choose Start -> Programs -> Microsoft Excel. 2. Open a new spreadsheet and save it as sort.xls 3. Enter the name, department and salary in different columns. 4. Click Data -> Form option 5. Click new button in the form to add the rows to the list. 6. Click Data -> sort, it shows list select sort dialogue box. 7. In the sort by drop down list select department. Click ok 8. Again in sort, click salary from then by drop down button at each field. 9. The rows will be sorted depending on department and salary. 10. Click data -> Filter -> auto filter, it shows a drop down button at each field. 11. On the dept click the drop down button and select accounts. 12. Place the cursor at a 15 and enter accounts salary and find the sum using sum formula. 13. find each departments total salary. 14. Save and close the spreadsheet. Department Computer Accounts Engineering Education Marketing Computer Accounts Engineering Education Marketing 12000 24000 9000 2000 4000 25000 45000 50000 6000 8000 Salary
Name:
Sec: C
HYPERLINK
Ex.No: 8 Date: Aim:
Name:
Sec: C
Name:
Sec: C
Write a C Program to find the sum of the digits of a number. #include<stdio.h> #include<conio.h> void main() { int num, no, sum=0,a; clrscr(); printf("\nEnter the Number to find the sum of the digit\n"); scanf("%d", &num); no=num; while(num!=0) { a=num%10; sum=sum+a; num=num/10; } printf("\nThe sum of the digit of the number %d is %d", no, sum); getch(); }
Name:
Sec: C
Write a C Program to reverse the digits of a number. #include<stdio.h> #include<conio.h> void main() { int num,no,rev=0,a; clrscr(); printf("Enter the Number to reverse the given number\n"); scanf("%d",&num); no=num; while(num!=0) { a=num%10; rev=rev*10+a; num=num/10; } printf("The reverse of the number %d is %d", no, rev); getch(); }
Name:
Sec: C
Write a C program to print all combinations of a 4-digit number. #include <stdio.h> #include <stdlib.h> #include<conio.h> void main() { int a,b,c,d; clrscr(); printf(" The permutations of a 4 digit number 1234 \n"); for(a=1; a<5; a++) { for(b=1; b<5; b++) { for(c=1; c<5; c++) { for(d=1; d<5; d++) { if(!(a==b || a==c || a==d || b==c || b==d || c==d)) printf("%d %d %d %d \n",a,b,c,d); } } } } system("pause"); getch(); }
Name:
Sec: C
Write a C Program to find the largest digit of a number. #include<stdio.h> #include<conio.h> void main() { int num,large=0,no,last; clrscr(); printf("\n\nEnter the number to find the largest digit of a Number\n"); scanf("%d",&num); no=num; while(num!=0) { last = num%10; if(large<=last) large=last; num=num/10; } printf("\nThe Largest digit of the number %d is %d",no,large); getch(); }
Name:
Sec: C
Write a C program to check whether the number and its reverse are same or not. #include<stdio.h> #include<conio.h> void main() { int num, no, rev=0, a; clrscr(); printf("Enter the Number to find the reverse is also same\n"); scanf("%d", &num); no=num; while(num!=0) { a=num%10; rev=rev*10+a; num=num/10; } if(no==rev) printf("The number and its reverse is same\n"); else printf("The number and its reverse is not same\n"); getch(); }
Name:
Sec: C
Write a C Program to check whether the given number is Armstrong number or not. #include<stdio.h> #include<conio.h> void main() { int num,no,arm=0,a; clrscr(); printf("Enter the number to find the given number is armstrong number or not\n"); scanf("%d",&num); no=num; while(num!=0) { a=num%10; arm=arm+a*a*a; num=num/10; } if(arm==no) printf("\nThe given Number is an Armstrong Number\n"); else printf("\nThe given Number is not an Armstrong Number\n"); getch(); }
Name:
Sec: C
Write a C program to find the sum of odd-positioned digits and even-positioned digits of a number separately. #include<stdio.h> #include<conio.h> void main() { int num,last,odd_sum=0,even_sum=0; clrscr(); printf("\nEnter the Number:"); scanf("%d",&num); while(num!=0) { last=num%10; if(last%2==0) even_sum=even_sum+last; else odd_sum=odd_sum+last; num=num/10; } printf("\nThe sum of odd-positioned digits is: %d",odd_sum); printf("\nThe sum of even-positioned digits is: %d",even_sum); getch(); }
Name:
Sec: C
Write a C program to find the second highest number from a set of numbers. #include<stdio.h> #include<conio.h> void main() { int num[100],i,n,temp,j; clrscr(); printf("\nEnter the number of terms: \n"); scanf("%d",&n); for(i=0;i<n;i++) { printf("\nEnter the number %d:\t",i+1); scanf("%d",&num[i]); } for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(num[i]<num[j]) { temp=num[i]; num[i]=num[j]; num[j]=temp; } } }
Name:
Sec: C
for(i=0;i<n;i++) { if(num[i]==num[i+1]) continue; else { printf("\nThe second Highest number is %d",num[i+1]); break; } } getch(); }
Name:
Sec: C
Write a C program to generate Fibonacci series. #include<stdio.h> #include<conio.h> void main() { int num,fib=0,a=0,b=1,i; clrscr(); printf("Enter the number:"); scanf("%d",&num); printf("FIBBONACI SEROIES IS:\n"); if(num==0) printf("0"); else { for(i=0;i<num;i++) { fib=fib+a; a=b;b=fib; printf("%d\t",fib); } } getch(); }
Name:
Sec: C
Write a C program to generate numbers between 1 and 100 which are divisible by 2 and not divisible by 3 and 5. #include<stdio.h> #include<conio.h> void main() { int i; clrscr(); for(i=1;i<=100;i++) { if((i%2==0)&&(i%3!=0)&&(i%5!=0)) printf("%d\n",i); } getch(); }
Name:
Sec: C
Write a C Program to get a line of text and count the number of vowels in the text. #include<stdio.h> #include<conio.h> #include<string.h> #include<ctype.h> void main() { int vowel=0, length, i; char line[1000]; clrscr(); printf("Enter the line of text:\n"); gets(line); length=strlen(line); for(i=0;i<length;i++) { if(isalpha(line[i])) { switch(toupper(line[i])) { case 'A': case 'E': case 'I': case 'O': case 'U': vowel++; } } }
Sec: C
Write a C Program to find the product of two matrices. #include<stdio.h> #include<conio.h> void main() { int a[10][10],b[10][10],c[10][10],m,n,i,j,p,q,option; clrscr(); printf("enter the order of matrix a:"); scanf("%d %d",&m,&n); printf("enter the %d elements of a\n",m*n); for(i=0;i<m;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); printf("enter the order of matrix b:"); scanf("%d %d",&p,&q); printf("enter the %d elements of b\n",p*q); for(i=0;i<p;i++) for(j=0;j<q;j++) scanf("%d",&b[i][j]); printf("enter the option:\n"); scanf("%d",&option); switch(option) { case 1 : if(m==p&&n==q) printf("the resultant matrix c is:\n"); for(i=0;i<m;i++) { for(j=0;j<n;j++) { c[i][j]=a[i][j]+b[i][j]; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("%d",c[i][j]);
Name: } printf("\n"); } break; case 2 : if(m==p&&n==q) printf("the resultant matrix c is:\n"); for(i=0;i<m;i++) { for(j=0;j<n;j++) { c[i][j]=a[i][j]-b[i][j]; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("%d",c[i][j]); } printf("\n"); } break; case 3 : if(n==p) { for(i=0;i<m;i++) { for(j=0;j<q;j++) { c[i][j]=0; for(p=0;p<n;p++) c[i][j]=c[i][j]+a[i][p]*b[p][j]; } } } printf("resultant matrix is:\n"); for(i=0;i<m;i++) { for(j=0;j<q;j++) { printf("%d\t",c[i][j]); } } printf("\n"); }
Sec: C
Name: getch(); }
Sec: C
Write a C program to arrange the set of numbers in descending order. #include<stdio.h> #include<conio.h> #define N 5 void main() { int arr[]={10,2,5,1,25}; int i,temp,j; clrscr(); printf("\nBefore Sorting..... "); for(i=0;i<N;i++) printf("\n%d",arr[i]); for(i=0;i<N;i++) { for(j=i+1;j<N;j++) { if(arr[i]>arr[j]) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } } printf("\n\nAfter Sorting....."); printf("\n\n** Sorting the array in Ascending order...\n"); for(i=0;i<N;i++) printf("\n%d",arr[i]); printf("\n\n** Sorting the array in Descending order...\n"); for(i=N-1;i>=0;i--) printf("\n%d",arr[i]); getch(); }
Name:
Sec: C
Write a C program to Calculate the area of a circle. #include<stdio.h> #include<conio.h> void main() { float r,area,circum; clrscr(); printf("\n Enter the radius of the Circle:"); scanf("%f",&r); area=3.14*r*r; circum=2*3.14*r; printf("\n Area= %f",area); printf("\n Circumference= %f",circum); getch(); }
Name:
Sec: C
Write a C program to Convert the C to F. #include<stdio.h> #include<conio.h> void main() { float f,c; clrscr(); printf("\n\n\nCelsius --> Farenheit\n"); scanf("%f",&c); f = c * 9/5 + 32; printf("\n\nThe Farenheit Value is %6.2fF", f); getch(); }
Name:
Sec: C
Write a C program to find the biggest of given three numbers. #include<stdio.h> #include<conio.h> void main() { int a,b, c; clrscr(); printf("\nEnter the three numbers:\n"); scanf("%d %d %d", &a, &b, &c); if(a>b && a>c) printf("\n%d is greater\n", a); else if(b>a && b>c) printf("\n%d is greater\n", b); else printf("\n%d is greater\n", c); getch(); }
Name:
Sec: C
Write a C program to Check whether the given year is leap year or not. #include<stdio.h> #include<conio.h> void main() { int year; clrscr(); printf("Enter the year: \n"); scanf("%d",&year); if(year%4==0) printf("\nIt is a leap year"); else printf("\nIt is not a leap year"); getch(); }
Name:
Sec: C
Write a C program to find whether the given number is even or odd. #include<stdio.h> #include<conio.h> void main() { int num,rem; clrscr(); printf("Enter a number: "); scanf("%d",&num); rem=num%2; if(rem==0) printf(" \n The entered number is EVEN \n"); else printf(" \n The entered number is ODD \n"); getch(); } b) Find the square root of a number.
Name:
Sec: C
Write a C program to find the factorial of given number using recursive function. #include<stdio.h> #include<conio.h> void main() { int fact=1,i,num; clrscr(); printf("Enter the number:"); scanf("%d",&num); for(i=1;i<=num;i++) { fact=fact*i; } printf("The factorial of %dis: %d",num,fact); getch(); }
Name:
Sec: C
Write a C program to find the roots of given quadratic equation. #include<stdio.h> #include<conio.h> #include<math.h> void main() { int a,b,c,d; float root1,root2; clrscr(); printf("Enter the values of a,b,c:"); scanf("%d %d %d",&a,&b,&c); d=((b*b)-(4*a*c)); printf("\nThe value of d is:%d",d); if(d>=0) { root1=((-b)+sqrt(d))/(2*a); root2=((-b)-sqrt(d))/(2*a); printf("\nThe roots of the values a=%d,b=%d,c=%d are:\n %f %f",a,b,c,root1,root2); } else printf("\nThe roots are imaginary"); getch(); }
Name:
Sec: C
Write a C program FOR SUMMATION #include<stdio.h> #include<conio.h> void main() { int i=1,sum=0; clrscr(); while(i<=10) { sum=sum+i; i++; } printf("The sum of numbers upto 10 is %d",sum); getch(); }
Name:
Sec: C
Write a C for find the series #include<stdio.h> #include<conio.h> #include<math.h> void main() { int n,i,w,s=0,p=2; clrscr(); printf("ENTER A VALUE FOR N" ,n); scanf("%d",&n); //printf("ENTER THE VALUE FOR P"); //scanf("%d",&p); for(i=1;i<=n;i++) { w=(pow(i,p)); s=s+w; } printf("SUM OF SERIES:%d",s); getch(); }
Name:
Sec: C