Friday, January 22, 2016

A program to calculate ten Fibonacci Series

Object: - Write a program and algorithm to calculate ten Fibonacci Series.

 

Algorithm-
Step (1):- Start
Step (2):- Declare the variable a, b, c, i as integer type
Step (3):- initializing
Step (4):- “Enter the number of terms:”
Step (5):- Read the value of n
Step (6):- Write “series are =”
Step (7):- Read the value of a & b
Step (8):- for( i=1; i<n-2; i++)
(8.1) c ←a+b
(8.2) Write the value of c
(8.3) a←b
(8.4) b←c
(8.5) end for loop

Step (9):- stop

Program:-
# include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,n,i;
clrscr();
a=1;
b=2;
printf("Enter the number of terms:");
scanf("%d",&n);
printf("Series are:");
printf("%d\t%d\t",a,b);
for(i=1; i<n-2; i++)
{
c=a+b;
printf("%d\t",c);
a=b;
b=c;
}
getch();
}
---------------------------------------------------------------------------------

Output:-

Enter the number of terms:10
Series are:1    2       3       5       8       13      21      34      55

Monday, January 11, 2016

To find the factorial of a given number.

Object: - Write a program and algorithm  to find the factorial of a given number.

Algorithm:-
Step (1):- Start
Step (2):- Declare the variable n, fact, i ;
Step (3):- initialize variable
fact ← 1
Step (4):- Read the value of n
For i ← 1 to n and i is incremented by 1
Step (5):- fact=fact * i
Step (6):- Display fact
Step (7):- Stop


Program:-

#include<stdio.h>
#include<conio.h>
void main()
{
int n, fact=1, i;
clrscr();
printf("Enter the Number");
scanf("%d",&n);
for(i=1; i<=n; i++)
{
fact=fact*i;
}
printf("%d",fact);
getch();
}

--------------------------------------------------------------------------------
Output:-

Enter the Number
5
120
--------------------------------------------------------------------------------

To check given number is Palindrome or not.

 Object: - Write a  program and algorithm to check given number is Palindrome or not. 
 

Algorithm-
 Step (1):- Start
Step (2):- Declare the variable n, r, p, temp. 
Step (3):- initialize p = 0  
Step (4):- “Enter the number”
Step (5):- temp ← n

Step (6):- while (n > 0)
(6.1) r=n%10
(6.2) p=p*10+r
(6.3) n=(n/10)
(6.4) end while loop

Step (7):- if (temp = = p)
(7.1) Given no is palindrome

Step (8):- else
(8.1) Given no is not palindrome

Step (9):- Stop.

Program:-

# include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n, r, p=0, temp;
printf("Enter the number:");
scanf("%d",&n);
temp=n;
while (n>0)
{
r=n%10;
p=p*10+r;
n=n/10 ;
}
if(temp==p)
{
printf("Given no is palindrome");
}
else
{
printf("Given no is not palindrome");
}
getch();
}

Output:-
------------------------------------------------------------------------

Enter the number:151
Given no is palindrome

To check given number is Armstrong or not.

Write a program and algorithm to check given number is Armstrong or not.
Step (1):- Start
Step (2):- Declare the variable n, r, arm = 0, temp
Step (3):- Enter the value of n
Step (4):- temp ← n

Step (5):- while (n > 0)
(5.1) r=n%10
(5.2) arm = arm + r * r* r
(5.3) n = (n/10)
(5.4) end while loop

Step (6):- if (temp = = arm)
(6.1)Given no is armstrong

Step (7):- else
(7.1)Given no is not armstrong

Step (8):- Stop.

Program:-

# include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n, r, arm=0, temp;
printf("Enter the value of n");
scanf("%d",&n);
temp=n;
while (n>0)
{
r=n%10;
arm=arm+r*r*r;
n=n/10;
}
if(temp==arm)
{
printf("Given no is armstrong");
}
else
{
printf("not armstrong");
}
getch();
}
-------------------------------------------------------------------------

Output:-

Enter the value of n
153
Given no is armstrong

Monday, January 12, 2015

To Insert Picture, Clip Art, Smart Art.

Word 2007 allows you to Insert To Insert Picture, Clip Art, Shapes, Smart Art:

Insert To Insert Picture:
1.  Place your cursor in the document where you want to insert the picture
2.. Click on the Insert Tab on the Ribbon
3.. Click on the Picture from the Illustrations Group
4.. In Insert Picture, Select  your picture


5. Click on the Insert Button

Insert to the Clip Art –

1.  Place your cursor in the document where you want to insert the picture
2.  Click on the Insert Tab on the Ribbon
3.  Click the Clip Art from the Illustration Group
4.  The dialog box will open on the right side of the document.
5.  In Search for you can search Clip Art
6.  Click on the Go Button

To Insert Smart Art:

1.  Place your cursor in the document where you want the illustration/picture
2.  Click the Insert Tab on the Ribbon
3.  Select  the SmartArt button
4.  Choose a SmartArt  Graphics do you want on your document


5.  Click on the OK Button
6.  Type your text in the type your text here box.
Or 
7.  Click on the graphics to insert text or  type the text .

Sunday, January 11, 2015

To Insert Equations and Symbols

Word 2007 allows you to insert Equation, Symbols and Special Characters.

Equations- 
  • Word 2007 allows you to insert mathematical equations. To access the mathematical equations tool:
  • Place your cursor in the document where you want the equations.
  • Click the Insert Tab on the Ribbon
  • Select  Equation Button on the Symbols Group
  • Select the Equation do you want  or click  Insert New Equation
  • For edit the Equation 
  • Click on the Equation on the Symbols Group
  • The Design Tab will be Open in the Ribbon  

Symbols and Special Characters -
  • To insert symbols and special characters:
  • Place your cursor in the document where you want the symbol
  • Click the Insert Tab on the Ribbon
  • Click the Symbol button on the Symbols Group
  • Select  symbol do you want on document.
  • Click on the More Symbol for the More Symbols and Special Characters.
  • Select your symbols or Special Characters.
  • Click on the Insert button.

Tuesday, December 23, 2014

Some Shortcut Keys of MS EXcel

Some Shortcut Keys of MS Excel

F11                       -              Create a Chart
F7                         -              Speling Check
Ctrl + Shift + ;     -              Insert  Current Time
Ctrl +  ;                -              Insert Current Date
Ctr + Space          -               Select entire Column
Shift + Space       -              Select Entire Row
Shift + F3            -               Insert Function
Shift + F5            -               Find and Replace
Ctrl + F6             -              Switch between open Workbook/Windows
Ctrl + F9             -               Minimize the Current Workbook
Ctrl + F10          -                Maximize the Current Workbook
Ctr + A               -                Select All
Ctrl + B              -                Bold highlighted Selection
Ctrl + U              -                Underline the Highlighted Selection
Ctrl + I               -               Italic the Highlighted Selection
Alt  +  =               -                Formula to Sum all of the above cell
Ctrl +  Arrow Keys     -      Move to next section of the text
Ctrl + P              -                 For Print
Ctrl + Z               -                Undo