Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.
All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!
Good am mga kapwa IT
hi guys.. graduate na siguro tong gumawa ng thread..heh..
im 3rd year college it students..
d2 pla mga i.t. A..aus to
Good am mga kapwa IT
may pagkakaiba ba ang MIT sa IT na course? MIT kasi ako this year
MIT po ung kinuka ng mga IT graduate
masteral po iyon...
MIT=master
BSIT=bachelor
check me if im wrong
MIT siya ngayon?
Pano po nangyari yon? MIT na siya pero di alam ang pinagkaiba ng MIT at IT. Baka iba yun. Subject?
tama ba ung 1 ko dre ??gamitan mo ng looping yan dre
Singly Linked List
#include <iostream>
#include <iomanip>
using namespace std;
struct node{
int data;
node *next;
}*head;
void createlist(int);
void display();
int main()
{
while(1)
{
int choice;
system("cls");
cout << "[1] - Create a list\n";
cout << "[2] - Display\n";
cout << "[9] - Exit\n";
cout << "===================\n";
cout << "Enter your choice: ";
cin >> choice;
int n, num, pos;
switch(choice){
case 1:
cout << "\nHow many node you want: ";
cin >> n;
cout << "\nEnter " << n << " element(s)\n";
for(int i=0;i<n;i++)
{
cin >> num;
createlist(num);
}
display();
break;
case 5:
display();
break;
case 9:
exit(1);
default:
cout << "\nWrong choice!\n";
}
cout << endl;
system("pause");
}
return 0;
}
//creation
void createlist(int n)
{
node *p, *tail;
tail = new node;
tail->data = n;
tail->next = NULL;
if(head==NULL)
head=tail;
else
{
p=head;
while(p->next!=NULL)
p=p->next;
p->next = tail;
}
}
//display
void display()
{
node *p;
if(head==NULL)
{
cout << "List is empty!\n";
return;
}
p=head;
cout << endl;
cout << setw(20) << "POINTER" << setw(20) << "DATA" << setw(20) <<
"NEXT" << endl;
while(p!=NULL)
{
cout << setw(20) << p << setw(20) << p->data << setw(20) << p->next << endl;
p = p->next;
}
cout << endl;
}
//BASIC PROGRAMMING APPROACH
#include<iostream>
using namespace std;
int main()
{
int n, a[10];
cout<<"Enter number of elements in an array: ";
cin>>n;
cout<<"Enter " <<n <<" elements: ";
for(int i=0;i<n;i++)
cin>>a[i];
cout<<"Array elements before sorting\n\n";
cout<<"\tINDEX" <<"\tVALUE"<<endl;
for(int i=0;i<n;i++)
cout<<"\t["<<i <<"]"<<"\t"<< A[i] <<endl;
for(int i=n;i>l;i--)
for(int j=0;j<i-1;j++)
if(a[j] > a[j+l])
{
int swap= a[j];
a[j] = a[j+l];
a[j+l] = swap;
}
cout<<"\nArray elements after sorting\n\n";
cout<<"\tINDEX" <<"\tVALUE"<<endl;
for(int i=0;i<n;i++)
cout<<"\t["<<i <<"]"<<"\t"<< A[i] <<endl;
system("pause>0");
return 0;
}
p help naman po ako ! make a program like 'WHO WANTS TO BE A MILLIONAIRE' using JAVA , sana po my makatulong sa akin, FINALS PROJECT po kasi eh this SEM. please po