> Customer Scheduling Program C++ Language | krehstorrs
NEW POST | Welcome to Krehstorrs Blog
Home » » Customer Scheduling Program C++ Language

Customer Scheduling Program C++ Language

Customer Scheduling Program  C++ Language - you can create a program from c + +, about scheduling your customers you can make a quick program, attachment code below will direct you to your new program, ... you can do this as you like, visit our blog regularly and we will always provide the latest information about program and technology ..
C++ Language
C++ Language





#include <cstdlib>
#include <iostream>
using namespace std;
struct pelanggan{
       int waktu,id;
       }; 
void penjadwalanPelanggan(pelanggan p[], int n){
        int i,j,temp,tukar;
        //tukar = 1;
        for(i=1; i< n-1 && tukar; i++){
        //tukar = 0;
        for (j=n; j<i+1; j--)
        if (p[j].waktu < p[j-1].waktu){
             //tukar = 1; 
             temp = p[j].waktu;
             p[j].waktu = p[j-1].waktu;
             p[j-1].waktu = temp; }}
         for(int i=1; i<=n; i++){
                 p[i].id=i;
             cout<<"Pelanggan ke - "<<p[i].id<<" "<<" dilayani ! ";
             cout<<endl;
             }
    }

int main(int argc, char *argv[]){
    pelanggan p[100];
    int n;
    cout<<"Masukkan banyak pelanggan : ";
    cin>>n;
    cout<<"Masukkan Waktu pelanggan : "<<endl;
    for(int i=1; i<=n; i++){
            p[i].id=i;
            cout<<"Pelanggan ke - ";
            cin>>p[i].id;
            cout<<"Waktu pelanggan : ";
            cin>>p[i].waktu;
            }
    penjadwalanPelanggan(p,n);
    cout<<endl;
    system("PAUSE");
    return EXIT_SUCCESS;
}
You have just read an article that category C Plus Plus by title Customer Scheduling Program C++ Language. You can bookmark this page with the URL http://krehstorrs.blogspot.com/2013/05/customer-scheduling-program-c-language.html Thank you!
Share this article :

1 comments:

 
Support : Home | Sitemap | Privacy | Link List
Copyright © 2013. krehstorrs - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger