Saturday, 16 December 2017

11D-prg16 Write a algorithm and program to calculate commission of salesman. The commission is calculated according to the following rates (using function)



30001 onwards 15%
22001  to 30000 10%
12001 to 22000 7%
5000 to 12000 3%
0 to 5000 0%

Algorithm
Input
1. sa   //sales amount, float sa
Output
1. comm    //commission
2. Ta         //Total amount

Method:
1.start
2. read sa
3. write sa
4. salcom(sa);   // calling function
5. stop

1. // Function
    void salcom(float sa)
    begin
            if(sa >= 30001)
             begin
                 comm= sa*0.15;
                 Ta = sa + comm;
              end
              else
               if( sa>=22001 and sa<=30000 )
               begin
                 comm= sa*0.10;
                 Ta = sa + comm;
              end
             else
               if( sa>=12001 and sa<=22000 )
               begin
                 comm= sa*0.07;
                 Ta = sa + comm;
              end
             else
               if( sa>=5000 and sa<=12000 )
               begin
                 comm= sa*0.03;
                 Ta = sa + comm;
              end
               else
                begin
                     Ta=sa;
                 end
             print"Commission=",comm;
             print" Total Amount=",Ta;
    2.stop

Thursday, 14 December 2017

11-D 21. Write a algorithm and program using nested loops to produce the following designs: Using functions and with switch concept in the main program

21.   Write a program using nested loops to produce the following designs: Using functions

A)
*
**
***
****
*****
B)
1
12
123
1234
12345
C)
1
23
456
78910


 #include<iostream.h>
 #include<conio.h>

 void dis21A(int x)
 {

  int i,j;
  i=1;
  while(i<=x)
  {
  for(j=1;j<=i;j++)
  {
  cout<<"*";
  }
  cout<<"\n";
  i++;
  }
  }

 void dis21B(int x)
 {

  int i,j;
  i=1;
  while(i<=x)
  {
  for(j=1;j<=i;j++)
  {
  cout<<j;
  }
  cout<<"\n";
  i++;
  }
  }
 void dis21C(int x)
 {

  int i,j,k;
  i=1,k=1;
  while(i<=x)
  {
  for(j=1;j<=i;j++)
  {
  cout<<k<<"\t";
  k++;
  }
  cout<<"\n";
  i++;
  }
 }

  void main()
  {
  int x,ch ;
  clrscr();
  cout<<"enter x \n";
  cin>>x;
  cout<<"enter choice\n";
  cin>>ch;
  switch(ch)
  {
  case 1:{
  dis21A(x);
  break;
  }
  case 2:{
dis21B(x);
break;
}
   case 3:{
dis21C(x);
break;
}

  default:{
   cout<<"wrong choice\n";
   break;
  }
  }
  getch();
  }












Wednesday, 13 December 2017

11D-prg-17 Write a algorith and program whether a given character is an alphabet, digit or any other character.using function


Algorithm:

Input:
1. ch  //character

Output:
1. al/dig/spec

Method:
1. start
2. Read ch
3. Print ch
4. //logic

  if(isalpha(ch))
   Print " The character is an alphabet "
  else
  if(isdigit(ch))
   print " The character is an digit"
  else
   Print " It is a special character"
5.Stop

11D-Prg-20. Write a Algorithim and Program to find a given number is Angstrom or not. using function




  Write a Algorithim and Program to find a given number is Angstrom or not.
  Algorithim:
        Input:
    1.      Num 
Output 
1.      The Num is Armstrong or not
Method:
1.     Start
2.    .  Read Num
3.      Print Num
4.       //logic
T=Num;
Sum=0;
While(Num != 0)
{
    Rem = Num % 10;
    Cub = pow(Rem,3);
    Sum=Sum + Cub;
    Num = Num /10;
}
if (Sum = = T)
    Print “ The given no is Armstrong”;
else
    Print” The given no is not Armstrong”;
5.    .  Stop

11D-19 Write a program to print Fibonacci series i.e.0 1 1 2 3 5 8………using function



Algorithm:
Input:
1)n
Output:
1)fibonaci numbers 0 1 1 2 3 5 ...
Method:
1. Start
2. Read n
3. Print n
4. //logic
5. f1=0;
6. f2=1;
7. print f1 and f2
8. for(i=3;i<=n;i++)
   begin
     f3=f1+f2
     print f3
     f1=f2
     f2=f3
   end
9.stop

11D-18.-Prog Write a program to compute Cosine series i.e.


18.   Write a program to compute Cosine series i.e.
Cos(x)= 1 – x2/2! + x4/4! – x6/6! + …xn/n!
Algorithm:
Input
1. x   //x=2
2. n  //n=3
Output
1. cx    // cosine series
Method:
1. start
2. Read x
3. Read n
4. //logic
cx=1;
j=2;
for(i=2;i<=n;i++)
begin
     fact=1;
     for(k=j;k>=1;k--)
   begin
      fact=fact*k
   end
    if(i%2==0)
    {
      cx=cx-pow(x,j)/fact;
    }
    else
    {
       cx=cx+pow(x,j)/fact;
     }
   j=j+2;
end
loop end
5.print cx
6.stop

Thursday, 9 November 2017

11-D prog-11 Write a algorithim and program to check the given number is prime or not


Algorithm:
Input
1) x
output
1) The given no is prime/ not prime.

Method:
1) Start
2) Read x
3) Write x
4) //logic
 for(y=2; y<x; y++)
   begin
           r= x%y;
           if (r==0)
           begin
                  L=1;
                  break;
            end
     end
5. if(L==1)
    write  "The given number is not a prime";
    else
    write "The given number is prime";
6. stop

Example:
1. x= 4    the given number is not prime
2. x= 9  the given number is not prime
3. x=17 the given number is pirme
     

Friday, 3 November 2017

PRE-BOARD AND BOARD EXAMINATION BLUE PRINT-17-18

COMPUTER SCIENCE (Theory)
Class XII - Code : 083
Blue Print


Unit
Unit
VSA
(1 Marks)
SAI
(2 Marks)
SAII
(3 Marks)
LA
(4 Marks)
Total
1
Review of C++ covered in Class XI
1(1)
8(4)
3(1)
-
12(6)
2
Object Oriented Programming in C++
  (a) Introduction to OOP using C++ b)
  (b) Constructor & Destructor
  (c) Inheritance


2(1)
2(1)


4(1)

4(1)

6(2)
2(1)
4(1)
3
Data Structure
(a)  Add Calculation
(b)  Static application of Objects
(c)  Dynamic allocation of Objects
(d)  Infix & Postfix Expression



2(1)

2(1)

3(1)
3(1)



4(1)

3(1)
5(2)
4(1)
2(1)
4
Data file handling in C++
(a)  Fundamental of file handling
(b) Text File
(c) Binary Files


1(1)


2(1)



3(1)


1(1)
2(1)
3(1)
5
Database & SQL
(a) Database concepts
(b) SQL



2(1)
2(1)



4(1)

2(1)
6(2)
6
Boolean Algebra
(a) Introduction to Boolean Algebra
(b) SOP & POS
(c) K-Map
(d)Basic Logic Gates



1(1)

2(1)


2(1)



3(1)


2(1)
1(1)
3(1)
2(1)
7
Communication Technologies
(a) Introduction to networking
(b) Media devices, Topology & Protocols
(c) Network Security Concepts
(d) Web Services
(e) Telecommunication tech.



1(2)
1(1)
1(1)

     2(1)



    4(1)

2(1)
4(1)
2(2)
1(1)
1(1)


7(7)
28 (14)
15(5)
20(5)
70(31)



12 C CS SUBJECT PRE-BOARD AND CBSE BOARD PATTERN EXAMINATION PATTER LEVEL WISE-2017-18

S NO.
UNIT
FIRST LEVEL
MARKS
SECOND LEVEL
MARKS
THIRD LEVEL
MARKS
TOTAL
1
C++ REVESION TOUR
1.DIRECT QUESTION (IDENTIFIER OR NOT )
2.NAMING THE HEADER FILES
2(1)

1(1)
1.SYNTAX ERROR
2(1)
1.OUTPUT FINDING-1
2.OUTPUT FINDING-2
3.OUTPUT FINDING-3
(STRUCTURE, CALL BY VALUE & REFERENCE, ARRAY CHARACTERS, POINTERS, CLASS, RANDOM NUMBERS, LOOPING )
2(1)
3(1)
2(1)
12(6)
2
OBJECT ORIENTED PROGRAMMING
1.DIRECT QUESTIONS
2(1)       
1.CONSTRUCTOR AND DESTRUCTOR
2(1)
1.CLASS LOGIC WRITING(PROGRAM)
2.ANSWER THE QUESTION(INHERITANCE CONCEPT)
4(1)

4(1)
12(4)
3
DATA STRUCTURE AND POINTER
1.ADRESS CALCULATION
2.INFIX TO POSTFIS AND POSTFIX EVAL (STACK)
3(1)

2(1)
STATIC ALLOCATION OF OBJECTS(-1D) (APPLICATION LEVEL)
2(1)
1.DYNAMIC ALLOCATION OF OBJECTS

2.STATIC ALLOCATION OF OBJECTS (2-D)-(APPLICATION LEVEL)
4(1)



3(1)

14(5)
4
DATA FILE HANDLING


1. FILL IN THE BLANKS BINARY FILE PROG.
2.TEXT FILE (FUNCTION)
1(1)

2(1)
1.BINARY FILE(FUNCTION)
3(1)
6(3)
5
DATA BASE AND SQL
1.DIRECT QUESTION
2.SQL COMMANDS
3.OUTPUT QUERIES
2(1)

4(1)

2(1)




8(3)
6
BOOLEAN ALGEBRA
1.LAWS(10+1=11)
2.LOGIC CIRCUIT & EXPRESSION
3.SOP AND POS  EXPRESSION
4.K-MAP SOP/POS
2(1)
2(1)

1(1)

3(1)




8(4)
7
NETWORK
1.INTRODUCTION OF NETWORK

2.MEDIA, DEVICES, TOPOLOGY AND PROTOCOLS

3 NETWORK SECURITY

4.WEB SERVICES

5.TELECOMMUNICATION
 TECHNOLOGIES
2(1)


4(1)



1(2)

1(1)

1(1)




10(6)

TOTAL

36 (18)

9(5)

25(8)
70(31)