Berita, Opini, Monetize, Teknologi Web dan Internet
Posts tagged virus
Top Antivirus Gratis
Feb 8th
Antivirus adalah sebuah pertahanan yang sangat penting bagi komputer agak tidak terinfeksi oleh virus. Bisa diibaratkan antibodi dalam tubuh manusia. Virus biasanya menjangkit di Komputer yang menggunakan OS Windows, baik Windows XP, Windows Vista, maupun Windows 7.
Memang tidak dipungkiri bahwa OS yang sulit dijangkiti virus adalah Linux, namun ketergantungan software dan kemudahan yang menyebabkan Windows tetap bertahan. Dari hari demi hari virus semakin bertambah dan merajalela. Andaikan komputer kita tidak ada yang memproteksi maka bersiap-siaplah untuk kehilangan data penting.
Subscribe to our newsletter and receive great tips!
Sandi Viginer
May 4th
#include<iostream.h> #include<string.h> #include<iomanip.h> void main() { char choice, again; char input1[50],lock1[50]; int p1,q1,jum_k1,jum_m1,hrf1_k=0,hrf1_m=0, ubh_k1[50],ubh_m1[50],ubh_h1[50]; char input2[50],lock2[50]; int p2,q2,jum_k2,jum_m2,hrf2_k=0,hrf2_m=0, ubh_k2[50],ubh_m2[50],ubh_h2[50]; cout << endl; cout << "|===============================================================|" << endl ; cout << "|===============================================================|" << endl ; cout << "|======================VIGENER CODE PROGRAM=====================|" << endl ; cout << "|===============================================================|" << endl ; cout << "|===============================================================|" << endl ; cout << "\t\t\t\tBy :" << endl ; cout << "\t\t1. Ahmad Nasrullah Jamaludin" << endl ; cout << "\t\t2. Laily Aminatus Sholikhah" << endl ; cout << "\t\t3. Wiwid Sofianti Budiono" << endl ; cout << endl; cout << "Choice:" << endl ; cout << "1. Convert simple sentences to vigener code whitout space" << endl; cout << "2. Convert vigener code to simple sentences whitout space" << endl; cout << endl ; cout << "CAUTION: " << endl ; cout << "Before run this program, the keyboard must CAPS LOCK condition" << endl ; back : cout << endl ; cout << "Enter your choice: " ; cin >> choice ; if (choice=='1') { cout << endl ; cout << "==============================================" << endl ; cout << " CONVERT SIMPLE SENTENCES TO VIGENER CODE " << endl ; cout << " Without Space " << endl ; cout << "==============================================" << endl ; cout << setiosflags(ios::left) << setw(20) << "Enter lock word" << ": " ; cin >> lock1; for (int r1=0;lock1[r1];r1++) { if ((lock1[r1]>='a')&&(lock1[r1]<='z')) hrf1_k++ ; } jum_k1=strlen(lock1) ; for (p1=0,q1=jum_k1;p1<jum_k1,q1<50;p1++,q1++) { lock1[q1]=lock1[p1] ; if (p1==(jum_k1-1)) p1=-1 ; if (q1==50) break ; } cout << setiosflags(ios::left) << setw(20) << "Enter sentences" << ": " ; cin >> input1 ; for (int s1=0;input1[s1];s1++) { if ((input1[s1]>='a')&&(input1[s1]<='z')) hrf1_m++ ; } jum_m1=strlen(input1) ; for (int x1=0;x1<jum_m1;x1++) { ubh_k1[x1]=(int)lock1[x1] ; ubh_m1[x1]=(int)input1[x1] ; ubh_h1[x1]=(ubh_m1[x1]-65)+ubh_k1[x1] ; } if (hrf1_k>=1||hrf1_m>=1) { cout << endl ; cout << "Sorry your lock word or sentences is wrong" << endl ; cout << endl ; cout << "URGENT:\n" ; cout << "Lock word must be capital word\n" ; } else { cout << setiosflags(ios::left) << setw(20) << "Code" << ": " ; for (x1=0;x1<jum_m1;x1++) { if (ubh_h1[x1]<=90) cout << (char)ubh_h1[x1] ; else cout << (char)(ubh_h1[x1]-26) ; } cout << endl ; } } else if (choice=='2') { cout << endl ; cout << "==============================================" << endl ; cout << " CONVERT VIGENER CODE TO SIMPLE SENTENCES " << endl ; cout << " Without Space " << endl ; cout << "==============================================" << endl ; cout << setiosflags(ios::left)<<setw(23) << "Enter lock word" << ": " ; cin >> lock2 ; for (int r2=0;lock2[r2];r2++) { if ((lock2[r2]>='a')&&(lock2[r2]<='z')) hrf2_k++ ; } jum_k2=strlen(lock2) ; for (p2=0,q2=jum_k2;p2<jum_k2,q2<50;p2++,q2++) { lock2[q2]=lock2[p2] ; if (p2==(jum_k2-1)) p2=-1 ; if (q2==50) break ; } cout << setiosflags(ios::left) << setw(23) << "Enter code" << ": " ; cin >> input2 ; for (int s2=0;input2[s2];s2++) { if ((input2[s2]>='a')&&(input2[s2]<='z')) hrf2_m++ ; } jum_m2=strlen(input2) ; for (int x2=0;x2<jum_m2;x2++) { ubh_k2[x2]=(int)lock2[x2] ; ubh_m2[x2]=(int)input2[x2] ; ubh_h2[x2]=(ubh_m2[x2]-ubh_k2[x2])+65 ; } if (hrf2_k>=1||hrf2_m>=1) { cout << endl ; cout << "Sorry your lock word or sentences is wrong\n" ; cout << endl; cout << "URGENT:\n" ; cout << "Lock word must be capital word\n" ; } else { cout << setiosflags(ios::left) << setw(23) << "Simple Sentences" << ": " ; for (x2=0;x2<jum_m2;x2++) { if (ubh_h2[x2]>=65) cout << (char)ubh_h2[x2] ; else cout << (char)(ubh_h2[x2]+26) ; } cout << endl ; } } else cout<<"Sorry your choice is not valid" << endl ; back2: cout << endl ; cout << "Do you want to use this program again? <y/n>" << endl ; cin >> again ; if (again=='Y'||again=='y') goto back ; else if (again=='N'||again=='n') { cout << endl; cout << "\t\t\tTHANK YOU" << endl; } else goto back2 ; }
Subscribe to our newsletter and receive great tips!
Program dengan encapsulation.
May 4th
#include<iostream.h> #include<math.h> class vector2dimensi{ float x, y; double r; public : void set_vector2dimensi(float xx, float yy){ x= xx; y= yy; } double panj_vector2D(){ r= sqrt(x*x+y*y); return r; } void show2D(){ cout<<"panjang vektornya adalah " << r << endl; } vector2dimensi operator+(vector2dimensi t1){ vector2dimensi temp; temp.x=x+t1.x; temp.y=y+t1.y; return temp; } void show(){ cout <<"Jumlahnya adalah " <<x<<" i + "<<y<<" j\n"; } }; class vector3dimensi{ float x, y, z; double s; public : void set_vector3dimensi(float xx, float yy, float zz){ x= xx; y= yy; z= zz; } double panj_vector3D(){ s= sqrt(x*x+y*y+z*z); return s; } void show3D(){ cout<<"panjang vektornya adalah " << s << endl; } vector3dimensi operator+(vector3dimensi t2){ vector3dimensi temp; temp.x=x+t2.x; temp.y=y+t2.y; temp.z=z+t2.z; return temp; } void show(){ cout <<"Jumlahnya adalah "<<x<<" i + "<<y<<" j + "<<z<<" k\n"; } }; void main(){ float u1, u2, u3, v1, v2, v3; vector2dimensi r1, r2, r3; vector3dimensi s1, s2, s3; int n; cout<<"----SELAMAT DATANG DALAM PROGRAM VECTOR----\n\n"; cout<<"Pilih (1) untuk menghitung panjang vektor 2D\n"; cout<<"Pilih (2) untuk penjumlahan dua vector 2D\n"; cout<<"Pilih (3) untuk menghitung panjang vektor 3D\n"; cout<<"Pilih (4) untuk penjumlahan dua vector 3D\n"; back: cout<<"Pilihan anda: "; cin>>n; if (n==1){ cout<<"vector r1= U1i + U2j \n"; cout << "Masukkan nilai U1: "; cin>>u1; cout<<"Masukkan nilai U2: "; cin>>u2; r1.set_vector2dimensi(u1, u2); r1.panj_vector2D(); r1.show2D(); } else if (n==2){ cout<<"vector r1= U1i + U2j \n"; cout << "Masukkan nilai U1: "; cin>>u1; cout<<"Masukkan nilai U2: "; cin>>u2; cout<<"vector r2= V1i + V2j \n"; cout <<"\nMasukkan nilai V1: "; cin>>v1; cout<<"Masukkan nilai V2: "; cin>>v2; r1.set_vector2dimensi(u1, u2); r2.set_vector2dimensi(v1, v2); r3=r1+r2; r3.show(); } else if (n==3){ cout<<"vector s1= U1i + U2j + U3k\n"; cout << "Masukkan nilai U1: "; cin>>u1; cout<<"Masukkan nilai U2: "; cin>>u2; cout<<"Masukkan nilai U3: "; cin>>u3; s1.set_vector3dimensi(u1, u2, u3); s1.panj_vector3D(); s1.show3D(); } else if (n==4){ cout<<"vector s1= U1i + U2j + U3k\n"; cout << "Masukkan nilai U1: "; cin>>u1; cout<<"Masukkan nilai U2: "; cin>>u2; cout<<"Masukkan nilai U3: "; cin>>u3; cout<<"\nvector s2= V1i + V2j + V3k\n"; cout << "Masukkan nilai V1: "; cin>>v1; cout<<"Masukkan nilai V2: "; cin>>v2; cout<<"Masukkan nilai V3: "; cin>>v3; s1.set_vector3dimensi(u1, u2, u3); s2.set_vector3dimensi(v1, v2, v3); s3=s1+s2; s3.show(); } else{ cout<<"Masukan salah, silahkan ulangi lagi!\n"; goto back; } }





