Oct 9, 2019

FUNCTION OF STATISTICS


function of statistic,what i sthe fucnyion of statistic
function of statistic


                         FUNCTION OF STATISTICS:
         There are many function of satistic that helps and make easy       vaorius types problems.
          Here we mentioned five important function of statistic which are.

     1.  SIMPLIFICATION OF COMPLEX FACT:
  Sometime time we have to collect and organize huge amount of facts and figure which is beyond the reach of human mind. Here statistical method makes it to possible to understand in the short span of time in better way.

      2.  COMPARISON:
  Comparison is another function of statistic; the simplified data can be correlated and compared by certain mathematical question like average and ratio etc.

      3.  RELATIONSHIP BETWEEN FACTS:
 In this function of statistic it used to investigate the relation between two or more facts.
Such as relation between demand and supply.

      4.  FORECASTING:
  The prediction of future course of action of the phenomenon can be considered as an important function of statistic

      5.   CLASSIFICATION OF DATA:
   The process of splitting data into certain parts which help in the matter of comparison, analysis and interpretation of the various features of the data.   
          

Oct 5, 2019

Basic C++ Programs

C++ basic, fundamental C++ program
basic C++ programs
     
        Also See The Related Pages
      C++ programming Examples.  click it
      Variable Deceleration in C++ . click it
                Data Type in C++. click it









BASIC C++ PROGRAMS:
  The fundamental and basic programs and their result s are:
The given task is called problem and the solution will be solution program.

1.       Write a program that prints or display at output screen a statement such as ‘I love my country’.

Start from including header files which will be stdio.h.
Let’s start,
Note that in c we use small case letters for predefined/built-in function.

#include< stdio.h>
#include<conio.h>
void main (void)
{
printf (“i love my country”);
getch ();
}

Output will be on screen,
I love my country

In above program we use two headers stdio.h and conio.h where stdio means standard input/outputs, like scanf for get values and printf to print or display something may be statements or values at output screen. And conio console input/output, like getch used to get any character from keyboard which may be number, symbol, characters means any key from keyboard. We used getch () in this program to see our result otherwise program will show the results but in nanosecond and getch () will stop the screen/result until we press any key.

2.       Write a c program that take two integer values and display the sum of number.

#include<stdio.h>
#include<conio.h>
void main (void)
{
int num1, num2, sum;
printf (“enter num 1=”);
scanf (“%d”, &num1);
printf (“enter num 2=”);
scanf (“%d”, &num2);
sum = num1 + num2;
printf (“sum of given number =%d”, sum);
getch ();
}

Output will be on screen
Enter num1 = 4
Enter num2 = 5
Sum of given number = 9
In output the 4 and 5 gave at run time.
Above program int num1, num2 is used to define two integer variables.  printf is used to display the sentence enclosed in double quotation and scanf used to take input, %d is format specifier that explained what type of data type should input or output in printf also used %d which is also used to output what type of data type will outputs. &, it is address operator which indicate the input variable will store at the location after it mention such as here &num1 means the input will store at num1 location addressed.

3.       Write a program that take two integer values and display the product.

 #include< stdio.h>
#include<conio.h>
void main (void)
{
int num1, num2, prod;
printf (“enter num 1=”);
scanf (“%d”, &num1);
printf (“enter num 2=”);
scanf (“%d”, &num2);
prod = num1 * num2;
printf (“product of given number =%d”, prod);
getch ();
}

Output will be on screen
Enter num1 = 4
Enter num2 = 5
Product of given number =20
In output the 4 and 5  gave at run time.

4.       Write a program that take two integer values and display the quotients.

#include< stdio.h>
#include<conio.h>
void main (void)
{
int num1, num2, qout;
printf (“enter num 1=”);
scanf (“%d”, &num1);
printf (“enter num 2=”);
scanf (“%d”, &num2);
qout = num1/ num2;
printf (“Quotients  of given number =%d”, qout);
getch ();
}

Output will be on screen
Enter num1 = 20
Enter num2 = 5
Quotients of given number =4
In output the 20 and 5 gave at run time.
/ is used to divide and find quotients.

5.       Write a program that take two integer values and display the modules.

#include< stdio.h>
#include<conio.h>
void main (void)
{
int num1, num2, mod;
printf (“enter num 1=”);
scanf (“%d”, &num1);
printf (“enter num 2=”);
scanf (“%d”, &num2);
mod = num1% num2;
printf (“modules of given number =%d”, mod);
getch ();
}

Output will be on screen
Enter num1 = 18
Enter num2 = 4
Modules of given number =2
In output the 20 and 5  gave at run time.

% is used to find modules where %d is format specifier.


                                                                                                                                 Goto Computer label

Oct 1, 2019

LOGICAL OPERATOR EXAMPLES


proposition operator examples.
logical operator examples
                                           

                                           Also search for this
                                     What is proposition?   click it
                        What is of logical operators define types?   click it






     1.        Let p, q, and r be the propositions
               p: You have the flu.
               q: You miss the final examination.
                r: You pass the course.

            a.       p ® q
If you have the flu, then you will miss the final examination.
            b.      Ø q « r 
You will not miss the final examination if and only if you pass the course.
            c.       q ® Ør
If you miss the final examination, then you will fail the course.
            d.      p v q V r
You have the flu either you miss the examination, or you pass the course.
             e.      (p ® Ør) v (q ® Ør)
If you have the flu, then you will not pass the course, or if you miss the final examination, then you will fail the course
            f.        (p /\ q) V (Øq /\ r)
You have the flu and you miss the final examination, or you will not miss the final examination and you pass the course.

     2.       Let p, q, and r be the propositions 
            p: You get an A on the final exam.
            q: You do every exercise in this book.
            r: You get an A in this class.
Write these propositions using p, q, and r and logical connectives.

a.       You get an A in this class, but you do not do every exercise in this book.
r Ù Øq
b.      You get an A on the final, you do every exercise in this book, and you get an A in this class.
p Ù q Ù r
c.       To get an A in this class, it is necessary for you to get an A on the final.
r ® p
d.      You get an A on the final, but you don't do every exercise in this book; nevertheless, you get an A in this class.
p Ù Øq Ù r
e.      Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class.
(p Ù q) ® r
f.        You will get an A in this class if and only if you either do every exercise in this book or you get an A on the final.
r « (q Ú p)

     3.       Construct a truth table for each of these compound propositions.
a.       p ®(Øq v r)

p
q
r
Ø q
Ø q Ú r
p ® (Ø q Ú r)
T
T
T
F
T
T
T
T
F
F
F
F
T
F
T
T
T
T
T
F
F
T
T
T
F
T
T
F
T
T
F
T
F
F
F
T
F
F
T
T
T
T
F
F
F
T
T
T

b.      Ø p ® (q ® r)

p
q
r
Ø p
q ® r
Øp ® ( q®r)
T
T
T
F
T
T
T
T
F
F
F
T
T
F
T
F
T
T
T
F
F
F
T
T
F
T
T
T
T
T
F
T
F
T
F
F
F
F
T
T
T
T
F
F
F
T
T
T

c.       (p ® q) v (ØP ® r)

p
q
r
Ø p
p ® q
Øp ® r
(p ® q) Ú (Øp ® r)
T
T
T
F
T
T
T
T
T
F
F
T
T
T
T
F
T
F
F
T
T
T
F
F
F
F
T
T
F
T
T
T
T
T
T
F
T
F
T
T
F
T
F
F
T
T
T
T
T
F
F
F
T
T
F
T

d.   (p ® q) Ù ( Ø p ® r)

p
q
r
Ø p
p ® q
Øp ® r
(p ® q) Ù (Øp ® r)
T
T
T
F
T
T
T
T
T
F
F
T
T
T
T
F
T
F
F
T
F
T
F
F
F
F
T
F
F
T
T
T
T
T
T
F
T
F
T
T
F
F
F
F
T
T
T
T
T
F
F
F
T
T
F
F

e.      (p « q)v( Øq « r)

p
q
r
Ø q
p « q
Øq « r
(p « q) Ú (Øq « r)
T
T
T
F
T
F
T
T
T
F
F
T
T
T
T
F
T
T
F
T
T
T
F
F
T
F
F
F
F
T
T
F
F
F
F
F
T
F
F
F
T
T
F
F
T
T
T
T
T
F
F
F
T
T
F
T

f.        ( Ø p « Øq) « (q«r)

p
q
r
Øp
Ø q
Øp « Øq
q « r
(Øp « Øq) « (q « r)
T
T
T
F
F
T
T
T
T
T
F
F
F
T
F
F
T
F
T
F
T
F
F
T
T
F
F
F
T
F
T
F
F
T
T
T
F
F
T
F
F
T
F
T
F
F
F
T
F
F
T
T
T
T
F
F
F
F
F
T
T
T
T
T

     4.        Evaluate each of these expressions.

a.       I 1000  Ù (0 1011 Ú I 1011)
0 1011  Ú  I 1011 = 11011
I 1000   Ù 11011 = 11000

b.      (0 IIII Ù I 0101)  Ú 0 1000  
0 IIII Ù I 0101 = 00101
00101  Ú 0 1000 = 01101

c.       (01010 Å 11011) Å 0 1000   
01010 Å 11011 = 10001
10001 Å 0 1000   = 11001

d.      (11011 Ú 0 1010) Ù (10001 Ú 11011)
11011 Ú 0 1010 = 11011
10001 Ú 11011 = 11011
11011 Ù 11011 = 11011

                                                                    MATH LABEL