S

@Sivaprakashm

Sorting

C++
4 years ago
#include<iostream> using namespace std; int main() { int a[50],n,i,j,temp,k=1; cout<<"\n SORTING NUMBERS "<<endl; cout<<"\n Enter the no of elements in an array : "; cin>>n; cout<<n<<endl; for(i=0;i<n;i++)

Sorting

C++
4 years ago
#include<iostream> using namespace std; int main() { int a[50],n,i,j,temp,k=1; cout<<"\n SORTING NUMBERS "<<endl; cout<<"\n Enter the no of elements in an array : "; cin>>n; cout<<n<<endl; for(i=0;i<n;i++)

Matrix multiplication using class

C++
4 years ago
// MATRIX MULTIPLICATION Using Class #include<iostream> using namespace std; class matmul { public: int a[10][10],b[10][10],c[10][10],i,j,k,r1,r2,c1,c2; void input();

Matrix addition and subtraction using class

C++
4 years ago
// MATRIX ADDITION and SUBTRACTION ; #include<iostream> using namespace std; class mat { int a[10][10],b[10][10],c[10][10],d[10][10],i,j,n; public: void getdata();

Sorting numbers in array

C++
4 years ago
// SORTING Numbers in ARRAY #include<iostream> using namespace std; int main() { int a[50],n,i,j,temp; cout<<"\n SORTING Numbers ;"<<endl; cout<<"\n Enter a Limit of Numbers : ";

Prime numberusing class

C++
4 years ago
// PRIME Number Checking Program Using Class #include <iostream> using namespace std; class prime { int n,i,c=0; public: void getdata();

Palindrome number using class

C++
4 years ago
// PALINDROME Number Checking Program Using Class #include <iostream> using namespace std; class pali { int n,t,rem,sum=0; public: void getdata();

Armstrong number using class

C++
4 years ago
// Armstrong Number Checking Program Using Class #include <iostream> using namespace std; class arms { int a,t,rem,sum=0; public: void getdata();

Swap¹

C++
4 years ago
// Swapping Two Values Using Call by Value and Call by Reference #include<iostream> using namespace std; void swap(int *x, int *y) { int swap; swap=*x; *x=*y;

Positive or Negative or Zero checking Using Class

C++
4 years ago
#include <iostream> using namespace std; class number { int num; public: void getdata(); void check(); }; void number::getdata()

Odd or Even Number checking Using Class

C++
4 years ago
#include <iostream> using namespace std; class number { int num; public: void getdata(); void check (); }; void number::getdata()

Personal Details using Class and Objects

C++
4 years ago
#include <iostream> using namespace std; class personal_details { char name[30],blood[10],gender[10],father[30],mother[30],hobby[20]; int date,month,year,age; public: void getdata(void); void display(void); };

Grade of a student Using Nested if With Class

C++
4 years ago
#include <iostream> using namespace std; class Grade { int Mark1,Mark2,Mark3,Total,Avg; public: void getdata(); void check(); }; void Grade::getdata()

Largest Among three numbers Using Inline Function

C++
4 years ago
#include <iostream> using namespace std; inline int cmp(int x,int y,int z) { if(x>y&&x>z) return(x); else if(y>z) return(y); else return(z);

Largest Among three numbers Using Inline Function

C++
4 years ago
#include <iostream> using namespace std; inline int cmp(int x,int y,int z) { if(x>y&&x>z) return(x); else if(y>z) return(y); else return(z);

Swap two Numbers using Call by value and Call by Reference

C++
4 years ago
#include<iostream> using namespace std; void swap(int *x, int *y) { int swap; swap=*x; *x=*y; *y=swap; } int main()

Reverse of an interger

C++
4 years ago
#include <iostream> using namespace std; int main() { int n, reversedNumber = 0, remainder; cout << "Enter an integer: "; cin >> n; while(n != 0) {

Swapping of two numbers

C++
4 years ago
#include <iostream> using namespace std; int main() { cout<<"\n Swapping Program"; int x,y,temp; cout<<" \n Enter a Value Of X : "; cin>> x; cout<< x; cout<<" \n Enter a Value Of Y : ";

Odd or even

C++
4 years ago
#include <iostream> using namespace std; int main() { int i; cout<<" \n Enter a Number : "; cin>> i; cout<<i; if(i%2==0) cout<<"\n The given number is an Even number\n";

Arithmetic operation using switch case

C++
4 years ago
#include<iostream> using namespace std; int main() { float x,y; int a; cout<<"What Arithmetic Operation do you want to perform:\n"; cout<<"Press 1 for Addition \n" ; cout<<"Press 2 for Subtraction\n"; cout<<"Press 3 for Multiplication\n";