untitled
My sites
Home
Plus One
Plus two
Your Voice
About Author
Brother's Site
First Home
Kerala Links
Indian Links
Indian Fonts
Site Submission
Thss,Mlpy
Plus One Programs
Index of programs:Set 5
Decimal to binary and octact
Matrix Sum
Matrix Transpose
String reverse without using function
Sort in alpahbetic order
<<
Previous
Next Page
>>
Program1:
#include
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To convert decimal no to binary and octal Meant For: Plus One students,Kerala */ void main() { int bin(int),oct(int),n,x,y; clrscr(); cout<<"\n Enter number"; cin>>n; n=abs(n); //Only absolute value is taken x=bin(n); y=oct(n); cout<<"\n The binary equivalent is "<
Program 2:
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To find sum of given two matrices Meant For: Plus One students,Kerala */ void main() { int a[50][50],b[50][50],s[50][50],m,n,i,j; clrscr(); cout<<"Enter number of rows:"; cin>>m; cout<<"Enter number of cols:"; cin>>n; clrscr(); cout<<"\n\nEnter the elements of Array 1:\n"; for(i=1;i<=m;i++) for(j=1;j<=n;j++) { cout<<"\nArray element["<
>a[i][j]; } cout<<"\n\nEnter the elements of Array 2:\n"; for(i=1;i<=m;i++) for(j=1;j<=n;j++) { cout<<"\nArray element["<
>b[i][j]; } for(i=1;i<=m;i++) for(j=1;j<=n;j++) s[i][j]=a[i][j]+b[i][j]; clrscr(); // PRINTING OF SUM OF TWO MATRICES cout<<"\n\n******************** MATRIX A ***************************\n\n"; for(i=1;i<=m;i++) { for(j=1;j<=n;j++) cout<<"\t\t"<
Program 3:
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To find transpose of a matrix Meant For : Plus One students,Kerala Hint :Can check whether matrix is symmetric or not using this program */ void main() { int a[25][25],b[25][25],m,n; clrscr(); cout<<"Enter number of rows:"; cin>>m; cout<<"Enter number of cols:"; cin>>n; for(int i=0;i
>a[i][j]; for(i=0;i
Program 4:
#include
#include
For using string function #include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : Reverse of a string without using function Meant For: Plus One students,Kerala */ void main() { clrscr(); cout<<"Enter the string:"; char name[100],rev[100]; int n; gets(name); for(int i=0;name[i]!='\0';i++); n=i; int j=0; for(i=n-1;i>=0;i--) { rev[j]=name[i]; j=j+1; } rev[j]='\0'; cout<<"\nGiven string is:"<
Program5:
#include
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To alphabetically sort a given list of names Meant For: Plus One students,Kerala */ void main() { clrscr(); char name[100][200],buck[100][200]; int n,v; cout<<"Enter limit:"; cin>>n; for(int i=1;i<=n;i++) { cout<<"Enter string:"; cin>>name[i]; } for(i=1;i<=n-1;i++) { for(int j=1;j<=n-i;j++) { v=strcmp(name[j],name[j+1]); if(v>0) { strcpy(buck[j],name[j]); strcpy(name[j],name[j+1]); strcpy(name[j+1],buck[j]); } } } cout<<"Sorted names are"; for(i=1;i<=n;i++) cout<<"\n"<
<<
Previous Page
Next Page>>
Web Hosting
·
Blog
·
Guestbooks
·
Message Forums
·
Mailing Lists
Easiest Website Builder ever!
·
Build your own toolbar
·
Free Talking Character
·
Email Marketing
powered by
bravenet.com