Sunday, May 10, 2009

One of my friend contact me and ask me something about C++,,,

I already forgot it, but I try to do it, and at last I can finished it,,,, because I think it was not too dificult,,, it was too easy to me,,,,

wkwkwkwkwkwkwk

Array script :

# include
# include
# include
# include

void main()
{
 int i, j;
 int angka[5][5];
 int tambah_brs1 = 0, tambah_brs2 = 0, tambah_brs3 = 0, tambah_brs4 = 0, tambah_brs5 = 0, tambah_klm1 = 0, tambah_klm2 = 0, tambah_klm3 = 0, tambah_klm4 = 0,tambah_klm5 = 0;
 char coba;

 do
 {
  cout<< "Luthfina Ariyani"<
  /*** Input ***/
  for(i=0; i<5; i++)
  {
  for(j=0; j<5; j++)
  {
  cout<< "Data ke- " <  cin>> angka[i][j];
  }
  cout<  }

  /*** Output ***/
  for(i=0; i<5; i++)
  {
  for(j=0; j<5; j++)
  {
  cout<< angka[i][j];
  cout<< " ";
  }
  cout<< endl;
  }

  //Penambahan Baris 1
  for (i,j=0; j<5; j++)
  {
  tambah_brs1 = tambah_brs1 + angka[0][j];
  }
  cout<<"Hasil penambahan pada baris pertama adalah "<
  //Penambahan Baris 2
  for (i=1,j=0; j<5; j++)
  {
  tambah_brs2 = tambah_brs2 + angka[1][j];
  }
  cout<<"Hasil penambahan pada baris kedua adalah "<
  //Penambahan Baris 3
  for (i=2,j=0; j<5; j++)
  {
  tambah_brs3 = tambah_brs3 + angka[2][j];
  }
  cout<<"Hasil penambahan pada baris ketiga adalah "<
  //Penambahan Baris 4
  for (i=3,j=0; j<5; j++)
  {
  tambah_brs4 = tambah_brs4 + angka[3][j];
  }
  cout<<"Hasil penambahan pada baris keempat adalah "<
  //Penambahan Baris 5
  for (i=4,j=0; j<5; j++)
  {
  tambah_brs5 = tambah_brs5 + angka[4][j];
  }
  cout<<"Hasil penambahan pada baris kelima adalah "<
  cout<< endl;

  //Penambahan Kolom 1
  for (j=0,i=0; i<5; i++)
  {
  tambah_klm1 = tambah_klm1 + angka[i][0];
  }
  cout<<"Hasil penambahan pada kolom pertama adalah "<
  //Penambahan Kolom 2
  for (j=1,i=0; i<5; i++)
  {
  tambah_klm2 = tambah_klm2 + angka[i][1];
  }
  cout<<"Hasil penambahan pada kolom kedua adalah "<
  //Penambahan Kolom 3
  for (j=2,i=0; i<5; i++)
  {
  tambah_klm3 = tambah_klm3 + angka[i][2];
  }
  cout<<"Hasil penambahan pada kolom ketiga adalah "<
  //Penambahan Kolom 4
  for (j=3,i=0; i<5; i++)
  {
  tambah_klm4 = tambah_klm4 + angka[i][3];
  }
  cout<<"Hasil penambahan pada kolom keempat adalah "<
  //Penambahan Kolom 5
  for (j=4,i=0; i<5; i++)
  {
  tambah_klm5 = tambah_klm5 + angka[i][4];
  }
  cout<<"Hasil penambahan pada kolom kelima adalah "<
  cout<<"Coba lagi ? (Y/N) :";
  coba=getche();
 }
 while (coba=='y' || coba== 'Y');
 _exit(0);
}

this is from my friends will,,,

and she wants me to say her name,,,

and she is The most spectacular gal in da world.. Luthfina ariyani..haha,,,

nb: she wants me to write like that,,,,

1 Comment:

  1. Anonymous said...
    Hello,

    I am regular visitor of this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]Lots of good information here fauzan-reza.blogspot.com. Frankly speaking we really do not pay attention towards our health. In plain english I must warn you that, you are not serious about your health. Recent Scientific Research presents that nearly 60% of all U.S. adults are either chubby or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] So if you're one of these citizens, you're not alone. Infact many among us need to lose 10 to 20 lbs once in a while to get sexy and perfect six pack abs. Now next question is how you can achive quick weight loss? Quick weight loss can be achived with little effort. If you improve some of your daily diet habbits then, its like piece of cake to quickly lose weight.

    About me: I am writer of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also mentor who can help you lose weight quickly. If you do not want to go under painful training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effective weight loss.

Post a Comment