Sunday, 6 December 2015

Diamond shape Source code example in c/c++ source code, Diamond shape code example source code, source code,

Diamond shape Source code example in c/c++ source code, Diamond shape code example source code, source code,// LCM CODE Example.cpp : Defines the entry point for the console application.


// diamond2.cpp : Defines the entry point for the console application.
// 








#include "stdafx.h"
#include <iostream.h>
int main()
{
int Max_DiamondRange = 100, MainCounter = 1;
int LoopRange = ((Max_DiamondRange - 2)/4); //For Running Upper and Lower Loop Seprate.


int StartRange = 1;
int EndRange = 0;


//Print 1st *
cout<<"Diamond Structure with "<<Max_DiamondRange<<" '*'."<<endl<<endl<<endl;
while((LoopRange+1) >= MainCounter){
cout<<" ";
MainCounter++;
}
cout<<"*"<<endl;


//Generate Upper Body of the diamond
MainCounter = 1;
while(LoopRange >= MainCounter){

StartRange = 1;
EndRange = (LoopRange - MainCounter) + 1;
while(EndRange >= StartRange){
cout<<" ";
StartRange++;
}

cout<<"*";

StartRange = 1;
EndRange = (2 * MainCounter)-1;
while(EndRange >= StartRange){
cout<<" ";
StartRange++;
}

cout<<"*"<<endl;

MainCounter++;
}

//Generate lower Body of the diamond
MainCounter = 1;
while(LoopRange >= MainCounter){

StartRange = 1;
EndRange = MainCounter;
while(EndRange >= StartRange){
cout<<" ";
StartRange++;
}

cout<<"*";

StartRange = 1;
EndRange = ((LoopRange * 2) - (MainCounter * 2)+1);
while(EndRange >= StartRange){
cout<<" ";
StartRange++;
}

cout<<"*"<<endl;

MainCounter++;
}


//Print last *
MainCounter = 1;
while((LoopRange+1) >= MainCounter){
cout<<" ";
MainCounter++;
}
cout<<"*"<<endl<<endl;



cout<<"HeHeHe !"<<endl;
return 0;
}

Diamond shape example in c/c++ source code, Diamond shapeexample source code, source code,
Diamond shape example in c/c++ source code, Diamond shapeexample source code, source code,
Diamond shape example in c/c++ source code, Diamond shapeexample source code, source code,
Diamond shape example in c/c++ source code, Diamond shapeexample source code, source code,

Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends. - See more at: http://onlinecomputercafe.blogspot.com/2015/12/lcm-source-code-example-in-cc-source.html#sthash.oxxMKP7j.dpuf

LCM Source code example in c/c++ source code, LCM code example source code, source code,

LCM example in c/c++ source code, LCM example source code, source code,// LCM CODE Example.cpp : Defines the entry point for the console application.












# include <iostream>
# include <string >
using namespace std;
int main()
{
         int a,b,c;
         cout<< "Enter two nos :"<<endl;
         cout<<endl;
         cout<< "Enter first no. : ";
         cin>>a;
         cout<< "Enter sec. no. : ";
         cin>>b;
         c=a*b;
         while(a!=b)
              {
                    if(a>b)
                    a=a-b;
                    else
                    b=b-a;
               }
          cout<< "HCF = " << a<<endl;
          cout<< "LCM = " << c/a<<endl;
return 0;
}

LCM example in c/c++ source code, LCM example source code, source code,
LCM example in c/c++ source code, LCM example source code, source code,
LCM example in c/c++ source code, LCM example source code, source code,
LCM example in c/c++ source code, LCM example source code, source code,

Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends.

Saturday, 10 October 2015

if else example in c/c++ source code, if else example source code, source code,

if else example in c/c++ source code, if else example source code, source code,
// if else Example.cpp : Defines the entry point for the console application.
//











#include "stdafx.h"
#include<iostream.h>

int main(int argc, char* argv[])
{
char s;
cin>>s;
if(s!=1)
{
cout<<"if";
}
else
{
cout<<"else";
}


return 0;
}

if else example in c/c++ source code, if else example source code, source code,
if else example in c/c++ source code, if else example source code, source code,
if else example in c/c++ source code, if else example source code, source code,
if else example in c/c++ source code, if else example source code, source code,

Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends. - See more at: http://onlinecomputercafe.blogspot.com  

hash table in c/c++ source code, hash table source code, source code,

hash table in c/c++ source code, hash table source code, source code,
// hash table.cpp : Defines the entry point for the console application.
//  //


For More:>  Hash table......, general tree..., binary tree....., Graph in c++....., General Tree.... and many more...... 










#include "stdafx.h"
#include<iostream>
#include<string>

using namespace std;
struct daata
{
int id;
int data;
};
struct hasher
{
daata dt[11];
int name1;

hasher();
int hash(int &id);
int rehash(int &id);
int add(daata &d);
int remove(daata &d);
void output();
};

int hasher::hash(int &id)
{
return (id%11);
}
int hasher::rehash(int &id)
{
return ((id+1)/11);
}

hasher::hasher()
{
int i;
for(i=0; i=11; i++)
{
dt[i].id=-1;
dt[i].data=0;
}
int numel=0;
}
int i=0;
int hasher::add(daata &d)
{
if(i < 11)
{
int hashed=hash(d.id);
if(hashed>=0 && hashed<=10 && dt[hashed].id==-1)
{
dt[hashed].id=d.id;
dt[hashed].data=d.data;
return 0;
}
else
{
int i=0;
while(i<=10)
{
hashed=rehash(hashed);
if(dt[hashed].id==-1)
{
dt[hashed].id=d.id;
dt[hashed].data=d.data;
return 0;
}
else
{
if(i==11)
{
return -1;
}
i++;
}
}
}i++;

}
else
{
return (-1);
}
}

int hasher::remove(daata &d)
{
int hashed=hash(d.id);
if(dt[hashed].id==d.id)
{
dt[hashed].id=-1;
i=-1;
return 0;
}
else
{
int i=0;
while(i<=10)
{
hashed=rehash(hashed);
if(dt[hashed].id==d.id)
{
dt[hashed].id=-1;
i=-1;
return 0;
}
else
{
if(i==11)
{
return -1;
}
i++;
}
}
}
}

void hasher::output()
{
int i;
for(i=0; i<11; i++)
{
cout<<i<<"->"<<dt[i].data<<endl;
}
}

int main(int argc, char* argv[])
{

int id=100;
int ret;
daata d;
d.data=52005;
hasher h1;

while(ret != 1)
{
d.id=id;
ret=h1.add(d);
id += (id/2);
}
d.id=271861;
h1.remove(d);
h1.output();
return 0;

}

Graph in c/c++ source code, Graph source code, source code,

Graph in c/c++ source code, Graph source code, source code,
// graph.cpp : Defines the entry point for the console application.
//
//


For More:>  Sorting......, selection sort..., merge sort....., insertion Sort....., General Tree.... and many more......










#include "stdafx.h"
#include<iostream>
#include <list>

using namespace std;

// This class represents a directed graph using adjacency list representation
struct Graph
{
    int V;    // No. of vertices
    list<int> *adj; // Pointer to an array containing adjacency lists
    Graph(int V);  // Constructor
    void addEdge(int v, int w); // function to add an edge to graph
    void BFS(int s);  // prints BFS traversal from a given source s
};

Graph::Graph(int V)
{
    this->V = V;
    adj = new list<int>[V];
}

void Graph::addEdge(int v, int w)
{
   adj[v].push_back(w); // Add w to v’s list.
}

void Graph::BFS(int s)
{
    // Mark all the vertices as not visited
    bool *visited = new bool[V];
    for(int i = 0; i < V; i++)
        visited[i] = false;

    // Create a queue for BFS
    list<int> queue;

    // Mark the current node as visited and enqueue it
    visited[s] = true;
    queue.push_back(s);

    // "i" will be used to get all adjacent vertices of a vertex
    list<int>::iterator i;

    while(!queue.empty())
    {
        // Dequeue a vertex from queue and print it
        s = queue.front();
        cout << s << " ";
        queue.pop_front();

        // Get all adjacent vertices of the dequeued vertex s
        // If a adjacent has not been visited, then mark it visited
        // and enqueue it
        for(i = adj[s].begin(); i != adj[s].end(); ++i)
        {
            if(!visited[*i])
            {
                visited[*i] = true;
                queue.push_back(*i);
            }
        }
    }
}

int main()
{
Graph g(4);
g.addEdge(0, 1);
g.addEdge(0, 2);
    g.addEdge(1, 2);
    g.addEdge(2, 0);
    g.addEdge(2, 3);
    g.addEdge(3, 3); 


    int c;
    cout<<"enter values to starting vertex for traversal";
    cin>>c;
    cout << "Following is Breadth First Traversal (starting from vertex "<<c<<") \n";
    g.BFS(c);

    return 0;

}

Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends. - See more at: http://onlinecomputercafe.blogspot.com 

Saturday, 3 October 2015

Android Project List for Final Year List, Top android final year project ideas, android ideas, android final year project ideas,

Android Project List for Final Year List, Top android final year project ideas, android ideas, android final year project ideas,
Android Project List for Final Year List


Important Links



  1. Smart Messaging App
  2. Reminder application android
  3. QUIZ Application android



Quiz Application Android Project for final Year

 Reminder application Android Project for Final Year

 Smart messaging app

 App locker app

 Dictionary App

 Online shopping application

 Travelling management system

 Movie ticket booking system

 Social Networking app

 Download Manger app Android Project for final Year

 Sticky Notes app Android Project for final Year

 Web Browser Android Project for final Year Android Project for
Final Year

 Daily Mood Assessment Based on Mobile Phone Sensing.

 Database Refactoring and Regression Testing of Android Mobile
Applications

 Implementation of 3G Mobile Police System

 Android Phone Surveillance System

 Automatic Number Plate Recognition on Android Platform

 Implementation of Cuff less Continuous Blood Pressure
Measurement System based on Android

 Indoor Wi-Fi positioning system for Android-based smartphone.

 Lexus SMS controller for android based smart phones.

 Image based Chatting App Android Project for final Year

 Video chatting app Android Project for final Year

 Expense Manager App Android Project for final Year

 Phone Manager from web Android Project for final Year

 File manager system Android Project for final Year

 Online Contact Backup Android Project for final Year

 MP3 Player Android Project for final Year

 Interactive Keyboard Android Project for Final Year

 Online Video Streamer Android Project for final Year Android
Project for Final Year

 Web Audio player Android Project for Final Year

 Tracking Application Android Project for Final Year

 Ringtone generator Android Project for Final Year

 War Field Spying Robot with Night Vision Wireless Camera by
Android Applications

 Remotely Operated Four Quadrant DC Motor Control by Android
Applications

 Android Based Remote Programmable Sequential

 Remote Operated Density Based Auto Traffic Signal Control with
Android Applications

 Locating Equivalent Servants over

 Privacy Preserving Multi-keyword Ranked Search over Encrypted
Cloud Data Project

 Service-Centric Framework for a Digital Government Application

 TIC TAC TOE Game based on Android

 Social media account management tool. Android Project for Final
Year

 Screen shot application Android Project for Final Year

 Remote access your pc application Android Project for Final Year

 Hotel Booking System Android Project For Final Year

 Emergency Toll Free Number Android Project for Final Year

 Sky Map Android Project for Final Year

 QR Code based Information Access System App Android Project for
final Year

 Carrier Building Application Android Project For Final Year

 Online Doctor Appointment System android Project for Final Year

 Daily Activity Tracking Application. Android Project for Final Year

 Virtual TV remote control app android Project for Final Year

 Global Notification System. Android Project for Final Year

 Learning Management System app android Project for Final Year

 Class time table android Project for Final Year Remote Induction
Motor Control with 7 Segment Display

 Pick N Place Robotic Arm Controlled by Wireless Android
Applications

 Remote Password Operated Security Control by Android
Applications

 Remotely Operated Fire Fighting Robot by Android Applications

 Remote Speed Control of DC Motor by Android Applications

 Remote Controlled Home Automation Using Android Applications

 Remotely Controlled Android Based Electronic Notice Board

 Remote Operated Domestic Appliances Control by Using Android
Application

 Remote Operated AC Power Control with LCD Display Using
Android Applications

If you have any question or query related to this you can catch me at
http://onlinecomputercafe.blogspot.com/p/about-us.html

Important Links

  1. Smart Messaging App
  2. Reminder application android
  3. QUIZ Application android

LinkWithin