Bilis Padala
The most trustworthy shipping company in the world that originates in the Philippines.
Please provide the sender's information:
Name:
Address:
Contact Number:
Please provide the recipient's information:
Name:
Address:
Contact Number:
Please choose a country:
Please choose description:
Please input weight of package in kilograms:
kg
function compute()
{
var count=document.getElementById("country");
var desc=document.getElementById("desc");
var wt=document.getElementById("wt");
var amt;
var sname=document.getElementById("sname");
var sadd=document.getElementById("sadd");
var scon=document.getElementById("scon");
var rname=document.getElementById("rname");
var radd=document.getElementById("radd");
var rcon=document.getElementById("rcon");
if(sname.value=='')
{
alert("Sender's name must be included");
}
if(sadd.value=='')
{
alert("Sender's address must be included");
}
if(scon.value=='')
{
alert("Sender's contact number must be included");
}
if(rname.value=='')
{
alert("Recievers name must be included");
}
if(radd.value=='')
{
alert("Recievers address must be included");
}
if(rcon.value=='')
{
alert("Recievers contact number must be included");
}
if(wt.value=='')
{
alert("Please input The weight");
}
switch(desc.selectedIndex)
{
case 0:
amt=100;break;
case 1:
amt=200;break;
case 2:
amt=150;break;
default:
amt=50;break;
}
switch(count.selectedIndex)
{
case 0:
amt=parseFloat(wt.value)*5+amt;
break;
case 1:
amt=parseFloat(wt.value)*10+amt;
break;
default:
amt=parseFloat(wt.value)*12+amt;
break;
}
alert("Shipment charge is " +amt);
}
function summary()
{
var sname=document.getElementById("sname");
var sadd=document.getElementById("sadd");
var scon=document.getElementById("scon");
var rname=document.getElementById("rname");
var radd=document.getElementById("radd");
var rcon=document.getElementById("rcon");
var wt=document.getElementById("wt");
if(sname.value=='')
{
alert("Sender's name must be included");
}
if(sadd.value=='')
{
alert("Sender's address must be included");
}
if(scon.value=='')
{
alert("Sender's contact number must be included");
}
if(rname.value=='')
{
alert("Receivers name must be included");
}
if(radd.value=='')
{
alert("Receivers address must be included");
}
if(rcon.value=='')
{
alert("Receivers contact number must be included");
}
if(wt.value=='')
{
alert("Please input The weight");
}
document.write("");
document.write("Bilis Padala
");
document.write("Sender's Name:"+sname.value+'
');
document.write("Sender's Address:");
document.write(sadd.value+'
');
document.write("Sender's Contact Number:");
document.write(scon.value+'
');
document.write("Receiver's Name:");
document.write(rname.value+'
');
document.write("Receiver's Address:");
document.write(radd.value+'
');
document.write("Receiver's Contact Number:");
document.write(rcon.value+'
');
}
Tuesday, March 16, 2010
Webprog RICHARD ANTHONY MARX BAUTISTA
Tuesday, August 18, 2009
CHEAT 1
E postLabels=
#include
using namespace std;
struct node {
char name[20]; // Name of up to 20 letters
int age;
float height;
node *nxt; // Pointer to next node
};
node *start_ptr = NULL;
void add_node_at_end () {
node *temp, *temp2; // Temporary pointers
// Reserve space for new node and fill it with data
temp = new node;
cout <cin >> temp->name;
cout << "Please enter the age of the person : ";
cin >> temp->age;
cout << "Please enter the height of the person : ";
cin >> temp->height;
temp->nxt = NULL; // Set up link to this node
if (start_ptr == NULL)
start_ptr = temp;
else {
temp2 = start_ptr;
// We know this is not NULL - list not empty!
while (temp2->nxt != NULL) {
temp2 = temp2->nxt; // Move to next link in chain
}
temp2->nxt = temp;
}
}
void display_node(){
node *temp;
temp = start_ptr;
do {
if (temp == NULL)
cout << "End of list" << endl;
else {
// Display details for what temp points to
cout <name << endl;
cout << "Age : " <<>age << endl;
cout << "Height : " <<>height << endl;
cout << endl; // Blank line // Move to next node (if present)
temp = temp->nxt; }
} while (temp != NULL);
}
void delete_start_node() {
node *temp; temp = start_ptr;
start_ptr = start_ptr->nxt;
delete temp;
cout<<"The first record has been deleted"<}
int main(){
int choice;
do{
cout<cout<<"[2] Display Record"< cout<<"[3] Delete Record"< cout<<"[4] Exit"< cout<<"Choice:";
cin>>choice;
switch(choice){
case 1:
{add_node_at_end();
break;}
case 2:
{display_node();
break;}
case 3:
{delete_start_node();
break;}
default:
cout<<"Thank You...";
}
}while(choice!=4);
system("PAUSE");
return 0;
}
Subscribe to:
Posts (Atom)