Tuesday, 28 May 2013

program transpose matrix dengan c++

#include <cstdlib>
#include <iostream>

using namespace std;
void aku(){
int i,j,k,baris, kolom, m1[10]
[10],m2[10]
[10],hasil[10]
[10];
    cout<<"Operasi perkalian matrik"<<endl;
    do
    {
    cout<<"Jumlah baris = "; cin>>baris;
    cout<<"Jumlah kolom = "; cin>>kolom;
    }
    while((baris>10)||(kolom>10));
    cout<<"\nMatrix A" <<endl;
    for(i=0;i<baris;i++){
        for(j=0;j<kolom;j++)
        {
        cout<<"Data ["<<i<<","<<j<<"] = ";
        cin>>m1[i][j];
        }}
for(i=0;i<baris;i++){
        for(j=0;j<kolom;j++)
        {
        cout<<m1[i][j]<<" ";
        }
        cout<<endl;
        }
for(i=0;i<baris;i++){
        for(j=0;j<kolom;j++)
        {
        cout<<m1[j][i]<<" ";
        }
        cout<<endl;
        }
        }
     int main(int argc, char *argv[]){
         aku();

    system("PAUSE");
    return EXIT_SUCCESS;

}

Tuesday, 21 May 2013

pemrograman web java script tetang identitas

<HTML>
<HEAD><TITLE>Operator Aritmatika</TITLE></HEAD>
<BODY>
<P><SCRIPT language="javascript">
<!--
document.writeln("<PRE>");
document.writeln("<H1>POSTEST</H1>");
var Nama = "Fajar Nuryanto";
var NIM = "12018039";
var Umur = 20;

document.writeln ("Nama : " + Nama);
document.writeln ("NIM : " + NIM);
document.writeln ("Tahun Lahir saya : " + (2013 - Umur));
document.writeln ("3 tahun lagi saya berumur: " +( Umur + 3));

document.writeln("<PRE>");
//-->
</SCRIPT></P>
</BODY>
</HTML>

Konversi Suhu

#include <iostream> #include <conio.h> //#include <cstdlib> //#include <iostream.h> void main( float Celcius, Kelvi...