Saturday, 10 October 2015
Bahasa Pemrograman : Struktur Data 03
1. 3 Jenis Perulangan C++
For
Mencetak bilangan 10 sampai 1.
Void cetaklah(int i, int j){
int i=10;
int j=1;
for(i=10;i>=j;i--){
cout<<i;
}
Do...while
Mencetak bilangan 10 sampai 1.
void cetaklah(int i, int j){
int i=10;
int j=1;
do{
cout<<i;
}
while(i>j){
cout<<"Selesai";
}
While
Mencetak bilangan 10 sampai 1.
void cetaklah(int a, int b){
int i=a;
while(i>=b){
cout<<" I = "<<i;
}
2. Array
void masukandata(int A[], int n){
for(int i=0;i<=n;i++){
cout<<"Masukan Data ke"<<i+1;
cin>>A[i];
}
int jumlahkan(const int A[], int n){
int total=0;
for(int=0;i<n;i++){
total += A[i];
return total;
}
Subscribe to:
Post Comments (Atom)
R-chord 謝和弦 - I'm Not Your Prince Charming 我不是白馬王子 Lyrics 歌詞 with Pinyin
R-chord 謝和弦 x 高爾宣 & 李傑明 - I'm Not Your Prince Charming 我不是白馬王子 (Wo Bu Shi Bai Ma Wang Zi) Lyrics 歌詞 with Pinyin | 謝和弦 我不是白馬王子 歌詞 ...
-
In this post, we want to share with you, our Top 10 Popular Chinese / Mandarin Songs 2018 you must hear. There are many good and beautiful C...
-
Namewee 黃明志 x 911 玖壹壹 - Oh My God Lyrics 歌詞 with Pinyin Singer: Namewee 黃明志, 911 玖壹壹 Album: Over Cross Asia Title: Oh My God English Title: ...
-
音标( phonetic symbol ): yīn biāo 单韵母( single syllable ): dān yùnmǔ ā á ǎ à ō ó ǒ ò ē é ě è ī í ǐ ì ū ú ǔ ù ǖ ǘ ǚ ǜ 双韵母( double sy...
No comments:
Post a Comment