u

VB Projects

Get all Visual Basic Projects here..

Thursday, 5 January 2012

C++ Program to depict the usage of Binary Search Technique

Program to depict the usage of Binary Search Technique. (It is assumed that the list of numbers in an array is  stored in ascending order).  #include<iostream.h> #include<conio.h> main() { int num[10],m,min,max,mid,pp; clrscr(); cout<<"Enter any ten numbers as elements ofan array in";  cout<<" ascending order "<<endl; for (int i=0;i<10;i++) { cin>>num[i]; } cout<<endl<<"Enter number to search "; cin>>m; cout<<endl; min...

C++ Program to input any string upto 500 characters and convert the same into binary

C++ Program to input any string upto 500 characters  and convert the same into binary.  #include <iostream.h> #include <string.h> #include <stdlib.h> #include <conio.h> char *entry, letter, choice[2]; int ascii, len, binary[8], total; void prog(); int main() {       clrscr();       prog();       return 0; } void prog() {    entry = new char[501];    cout<<"Enter...

C++ Program to define a class point and implement operations

C++ Program to define a class point and implement operations.  #include<iostream.h> #include<math.h> #include<conio.h> class Point{ public:      Point(); void setPoint(float,float); void printPoint(); float getx(); float gety(); private:    float x;    float y;       };   Point::Point(){x=0.0;y=0.0;} void Point::setPoint(float a,float b)   {x=a;y=b;} void Point::printPoint()     ...

C++ Program to get the day the month starts on, and the number of days in the month to output a calendar

C++ Program to get the day the month starts  on, and the number of days in the month to  output a calendar. //-------------------Includes-------------------- #include <iostream.h> #include<conio.h> //--------------Function Prototypes-------------- int ShowDateLine(int day, int EndDay, int BoxWidth); void ShowRestOfBox(int BoxWidth, int BoxHeight); void ShowDates(int BoxWidth); void Divider(int BoxWidth); //---------------------Main---------------------- int main()...

C++ Program to print the corresponding ASCII character

C++ Program to print the  corresponding ASCII character #include <stdio.h> #include <fstream.h> #include <stdlib.h> #include<conio.h> main()     {     clrscr();     char line[512]; /* input string */     char sym;       /* ASCII code number */     cout<<"Please enter the number to be factored: ";     cin.getline(line, 512);    ...

C++ Program displays the month of any year and also has controls to view the previous & the Next months

C++ Program displays the month  of any year and also has controls to view the   previous & the Next  months. # include <iostream.h> # include <stdio.h> # include <conio.h> void main() {     clrscr();     int b1,b2,o;      cout<<"  ENTER THE MONTH  : ";     cin>>b1;     cout<<"  ENTER THE YEAR  : ";     cin>>b2;   ...

C++ Program to print prime factorization

C++ Program to print prime factorization #include<conio.h> #include <stdio.h> #include <stdlib.h> #include <fstream.h> main()     {     clrscr();     char line[512]; /* input string */     short ii;   /* number to be factored */     short j;   /* divisors */     short p;   /* powers of j in ii */     cout<<"Please enter the number...

C++ Program to conduct binary search for any alphabet [a-z] out of an array

C++ Program to conduct binary search  for any alphabet [a-z] out of an array#include <ctype.h> #include <conio.h> #include <iostream.h> #define max 26 char array[max] = "\0"; void initialise() {     for(int i=0; i<max; i++)     {         array[i] = (char)(65+i);     } } int binsearch(int low, int high, int &num) {     int mid = (high+low)/2;     if( array[mid]...

C++ Program using structure to define a Bank A/c System

C++ Program using structure to define a Bank A/c System#include "iostream.h" #include "conio.h" #include "stdio.h" struct account { int no[10]; char name[20]; long int d,b,a; long double t; }; void main() { clrscr(); window(27,2,53,4); textbackground(3); clrscr(); textcolor(0); cprintf(" \n   BANK ACCOUNT SYSTEM"); /*menu*/ window(20,5,60,25); textbackground(13); clrscr(); gotoxy(2,3); textcolor(10); cprintf("G"); gotoxy(3,3); textcolor(14); cprintf("ive The Account No."); /*name of the...

C++ Program to perform updation of a data file for mainipulating an address book

C++ Program to perform updation of a data file for mainipulating an address book#include<stdio.h> #include<stdlib.h> #include<fstream.h> #include<string.h> #include<conio.h> #define ENTER 13 #define BACK 8 struct student {   char name[30];   char proff[40];   char address[20];   char country[20];   char tel[20];   char fax[20];   char mobile[20];   char email[50]; }; class data { private:   student std;   int...

C++ Program adds two numbers in binary using class and object.

C++ Program adds two numbers in binary using class and object. #include<iostream.h> #include<conio.h> //using namespace std; class adder{ public:    int number1[8];    int number2[8];    int carry[8];    int sum[8];    int number_bits;    char choice;            void input(){       cout<<"Input the number of bits you want to enter\n";      ...

C++ Program to find all the combinations that you can make with one word

C++ Program to find all the combinations that you can make with one word example: "abc" -> 9 combinations -> abc - acb - bac - bca - etc... #include <iostream.h> #include <string.h> // Program to display the all available // unique combinations of a given string of any length. #include <iomanip.h> #include<conio.h> typedef char string[80]; long fac(int getal) // {   long faculteit = 1;   for (; getal>1; getal--) faculteit*=getal;   return...

Page 1 of 2512345Next

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More