Write a C++ Program to Compute the Sum and Average of Two Numbers

Engg.... | 01:04 | | Best Blogger Tips
Sum of Two Numbers

Manipulators:
  • Manipulators are the Operators that are used to Format the Data Display.
  • Example: endl
  • It is included in the <iomanip> Header File.
Statement of C++ Program: Enter Two Numbers and Calculate the Sum and Average of Two Numbers:

read more

Tutorial on Basic Concepts of C++ Program Part 1

Engg.... | 07:13 | | Best Blogger Tips
Concepts

Structure of C++ Program:
  • C++ Program contain Four Sections. 
  • These Sections may be placed in Separate code Files.
  • Most popular Compiler systems are UNIX AT & T C++ , Turbo C++ , Microsoft Visual C++.


          Include Files 
       Class Declaration 
 Member Function Definition 
     Main Function Program


read more

Write a C Program to Find The Middle Digit of a Three Digit Number

Engg.... | 10:06 | | Best Blogger Tips
Middle Digit

Statement of C Program: Input a Three Digit number and find out its Middle Digit: 

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf(" Enter a Three Digit Number:");
scanf("%d" ,&a);
read more

C Program: Write an Example of switch Statement on TV Favorite Programs

Engg.... | 10:00 | | Best Blogger Tips

Switch statement

Statement of C Program: Write an Example of switch Statement on TV Programs :

#include<stdio.h>
#include<conio.h>
void main()
{
int a ;
clrscr();
printf(" Categories\n ");
printf(" 1. Dance\n ");
printf(" 2. Singing\n");
printf(" 3. Interesting\n");
printf(" Enter your choice between 1 to 3:\n");
scanf("%d" ,&a);

read more

Write a C Program to Print The Given Number Pattern by using Nested for Loop

Engg.... | 01:18 | | Best Blogger Tips
Number_Pattern
 
NESTED FOR STATEMENT:
If one for statement is completely placed with in the other.

POINTS TO REMEMBER:
  • One loop must completely be placed inside the other loop means no overlapping of loops.
  • Each loop must have different variables.
Statement of C Program: This Program prints the Number 5, Five Times; Number 4, Four Times; Number 3, Three Times; Number 2, Two Times; Number 1, Once :


read more

Write a C Program to Find the Sum of Odd Numbers and Even Numbers from 1 to N by using if and for Statement

Engg.... | 08:45 | | Best Blogger Tips
Sum of Odd and Even
Data types:
  • Data Type defines what Type of value you can store in a Variable.
  • Primary Data Types: int ,float and char.
Float:
  • Format Specifier = %f
  • Keyword = float
  • Space = 4 byte
  • Range = 3.4 * 10^(38) to -3.4 * 10^(38)
  • Decimal values are allowed. 
Statement of C Program: Enter a Number ( N ) and Calculate the Sum of Odd and Even Numbers From 1 to N :
 
read more

Write a C Program to Check a Number Positive or Negative by using if Statement

Engg.... | 02:24 | | Best Blogger Tips
Positive and Negative Number

Function of clrscr() :
  • clrscr() Function is used to clear the Previous Output.
  • clrscr() Stands For Clear Screen.
  • clrscr() Function is included in the <conio.h> Header File.
  • clrscr() functions Terminates with the semicolon ( ; ).  
Statement of C Program: Enter a Number From Keyboard and Check It is Positive or Negative.

#include<stdio.h>
#include<conio.h>
void main()

read more

Write a C Program To Calculate The Area of Triangle

Engg.... | 01:07 | | Best Blogger Tips
Area_Of_Triangle

Formula of Area of Triangle:
  • Area = ( s (s-a) (s-b) (s-c) ) ^ (1/2)
  • where s = (a+b+c) / 2
  • a , b and c are the Sides of Triangle.
Statement of C Program: Write a Program to Find the Area of a Triange , given the Three Sides of Triangle:

#include<stdio.h>
#include<conio.h>
void main()

read more

Write a C Program to Compute the LCM and HCF of Two Numbers by using While Statement

Engg.... | 01:32 | | Best Blogger Tips
LCM and HCF

HCF:
  • HCF Stands For Higest Common Factor.
  • HCF is also Known as GCD (Greatest Common Divisor).
  • HCF of Two Number is defined as the Largest Number that Divides Both Numbers Completely with Remainder Zero.
LCM:
  • LCM Stands For Lowest Common Multiple.
  • LCM of two Numbers Defined as the Smallest Number that is Multiple of both Numbers. 
read more

Write a C Program For Fibonacci Series upto 100 by using while Statement

Engg.... | 01:31 | | Best Blogger Tips
Fibonacci_Series
Fibonacci Series:
  • Fibonacci Series is the Series in which Next Number is Sum of Previous Two Numbers.
  • Example: 0 1 1 2 3 5 8 13 21 34 ............and so on.
Statement of C Program: Write a program to show the Fibonacci Series upto 100:


#include<stdio.h>
#include<conio.h>
void main()


read more

Write a C Program to Calculate the Sum of First Fifty Numbers

Engg.... | 03:36 | | Best Blogger Tips
sum of first 50 numbers

Data types:
  • Data Type Defines what type of value you can store in a Variable.
  • Primary Data Types: int ,float ,char.
Int:
  • Format Specifier = %d
  • Keyword = int
  • Space = 2 byte
  • Range = -32768 to 32767
  • Decimal values are allowed.
Statement of C program: Find the Sum of first 50 Numbers by using for Statement:

read more

15 Most Important Differences Between C And C++

Engg.... | 06:51 | | | Best Blogger Tips
Relationship b/w C and C++

 Basic Introduction:
  • C++ is derived from C Language. It is a Superset of C. 
  • Earlier C++ was known as C with classes. 
  • In C++, the major change was the addition of classes and a mechanism for inheriting class objects into other classes. 
  • Most C Programs can be compiled in C++ compiler. 
  • C++ expressions are the same as C expressions. 
  • All C operators are valid in C++. 

read more

Write a Program to check a number it is Armstrong or not by using while and if Statement

Engg.... | 02:02 | | Best Blogger Tips

Armstrong Number

Armstrong Number:
  • Three Digit Armstrong Number defined as the Sum of cubes of its Digit is equal to the Number Itself.
  • Armstrong Number is also known as Narcissistic Number.
  • Example: 153 = (1*1*1) + (5*5*5) + (3*3*3)
Statement of C Program: Enter a number and check it is Armstrong or not:

read more

Write a Program to check a number Palindrome or not by using while and if Statement

Engg.... | 06:31 | | Best Blogger Tips
Palindrome Number

Palindrome Number:
  • Palindrome Number is a Symmetrical Number.
  • In simple words, Palindrome Number is a number that remains the same when its digits are Reversed.
  • Examples: 101, 141, 16461, 121 etc.
Statement of C program: Enter a number and check it is palindrome or not:

read more

C Program: Enter the Number and its Power and Compute the Result

Engg.... | 01:18 | | | Best Blogger Tips
exponents

Functions of Header files:
  • stdio.h  Stands for standard I/O Header File.
  • conio.h Stands for consol I/O Header File.
  • .h indictes the Extension of the Header File.
  • <stdio.h> Header File includes scanf() and printf() Functions.
  • <conio.h> Header file includes clrscr() and getch() Functions.

Statement of C program: Enter a Number and its Exponent and Show the Result.


read more

C Program: Calculate the Sum of all Odd numbers between 1 to 50 by using do-while Statement

Engg.... | 06:55 | | Best Blogger Tips
odd number sum

Statement of C program: Prints the Sum of all Odd integers between 1 to 50 :

#include<stdio.h>
#include<conio.h>

void main()
{
int odnum , sum=0;                                 // odnum Stands for Odd Number
odnum=1;


read more

C Program: Enter the Radius of circle and Find out its Area and Perimeter

Engg.... | 05:16 | | Best Blogger Tips
area and perimeter of circle

Statement of C program: Enter the radius of a circle and prints its 
  1. Area
  2. Perimeter
1. Area of Circle:

#include<stdio.h>
#include<conio.h>

void main()
{
float radius , area;              
float PI=3.142 ;
clrscr();

read more

C Program: Find the Sum of First 'n' Integers by using While Statement

Engg.... | 01:29 | | Best Blogger Tips
sum logo

Statement of C Program:  Calculate the sum of First 'n' Integers :

 
#include<stdio.h>
#include<conio.h>
void main()
{
int N,b ;
sum=0;
clrscr();

read more

C Program: Find out the Factorial of a Number by using While Statement

Engg.... | 01:03 | | Best Blogger Tips
factorial

Factorial :
  • Factorial of a non Negative number n is denoted by n!
  • Factorial Formula:  n! = 1*2*3*4.................*n
  •  Example:  5! = 5*4*3*2*1
Statement of C program: Input a number and compute its Factorial:

read more

C Program: Determine the Quadrant of point(x,y) by using AND Operator and else-if Statement

Engg.... | 02:24 | | | Best Blogger Tips
Quadrants

Function of scanf():
  • scanf() is the Input Statement.  
  • scanf() statement is used to give Input at the run time. 
  • Format: scanf(" %f " , &a);
  • In the above format 'a' is variable and value of 'a' is assigned at the run time. 
  • In scanf() statement, character 'f ' indicates the format i.e ("  ");
Statement of C program: Enter the value of x and y and determine the quadrant of point(x,y) :


read more

C Program: Enter a Number and Reverse It by Using goto Statement

Engg.... | 01:17 | | | Best Blogger Tips
Reverse Number
goto Statement:
  • goto statement is used to transfer control from one location to another location.
  • goto is a Keyword.
  • Keywords are the reserved words.
  • There are 32 keywords in C. 
Statement of C program: Enter a number and reversed it by using goto statement. 


read more

C Program: Conversion of Fahrenheit Temprature to Celsius Temprature

Engg.... | 23:57 | | | Best Blogger Tips
celsius and temprature

Function of void main() :
  • Main function of every C and C++ program. 
  • The execution of C program starts with the main() function. 
  • No program run without main() function.
  • There is no difference between void main() and main().
Statement of C program: Enter the Temprature in Fahrenheit and converts Fahrenheit into Celsius:
 
read more

C Program: Enter the Investment,Rate and Time and Compute the Simple Interest

Engg.... | 04:51 | | Best Blogger Tips
simple interest

Statement of 'C' program: Enter the Principal Amount, Rate of interest and Time and Calculate the Simple Interest.


#include<stdio.h>
#include<conio.h>
void main()
{
float P ,R ,SI ;                                                         //  P stands for Principal Amount   
                                                                               //  R stands for Rate of Interest
                                                                               //  SI stands for Simple Interest
clrscr();     

read more

C Program: How to Find First and Last digit of a three digit Number

Engg.... | 05:45 | | | Best Blogger Tips
first last getch

Function of getch():
  • getch() is a function included in the <conio.h> header file. 
  • It is used to take input a single character from keaboard. 
  • The input character is not displayed on the screen. 
  • It is used for output screen stopper.
Some shortcuts:
F2 => save
F3 => open
F5 => full screen

read more