Category: C++ Programming

Calculator in C++
C++ Programming

Calculator in C++

Calculator that performing as calculator which allows all Arithmetic Operators with operands as input #include<iostream.h> #include<stdlib.h> #include<conio.h> int calculator(int a,char c,int b) {     int h,w,x,z;     float y,m=0.0;     z=(a+b);     x=(a*b);     w=(a-b);     h=(a%b);     y=(a/b);     m=y;     switch(c)     {     case ‘+’:         cout<<a<<“+”<<b<<“=”<<z<<endl;         break;     case ‘-‘: […]

Rekha Setia 
Count of Odd and even,sum of odd and even,average array program in C++
C++ Programming

Count of Odd and even,sum of odd and even,average array program in C++

/* Fill up an array,print the array,count number of values,count the number of odd,count the number of even,sum  of odd ,sum of even,average,find largest value,find smallest */ #include<iostream.h> int fill_up(int array[],int size); void main() {     int array[10],size;     cout<<“Enter the size of an array:”<<endl;     cin>>size;     fill_up(array,size); } int fill_up(int array[],int size) {     […]

Rekha Setia 
Structure of C++ Program
C++ Programming

Structure of C++ Program

A program is a sequence of logical instructions that can be executed by a compiler in a computer. All programs are written to solve any problem by programming language. The best way to learn a programming starts from the root of that language. Therefore, here we will try to write our first program: Step-1: // […]

Rekha Setia