algoritma dan contoh.docx

7
1. WHILE #include <stdio.h> #include <conio.h> main() { int i=10; long j=10; printf ("Program peluncuran roket\n"); printf ("Tekan enter untuk menghitung mundur peluncuran roket\n"); getch(); while (i>=10){ printf ("%d\n\n",i); i--; while (j>=1){ printf("%d\n",j); // delay j--;} } printf("Go!!"); getch(); }

Upload: illumi-zaoldyeck

Post on 07-Nov-2015

247 views

Category:

Documents


0 download

DESCRIPTION

algoritma dan contoh progam beseerta source code dan screensoht progam yang berjalan algoritma dan contoh progam beseerta source code dan screensoht progam yang berjalan algoritma dan contoh progam beseerta source code dan screensoht progam yang berjalan

TRANSCRIPT

1. WHILE

#include #include main(){ int i=10; long j=10; printf ("Program peluncuran roket\n"); printf ("Tekan enter untuk menghitung mundur peluncuran roket\n"); getch(); while (i>=10){ printf ("%d\n\n",i); i--; while (j>=1){ printf("%d\n",j); // delay j--;} } printf("Go!!"); getch();}

2. D0-WHILE#include #include

using namespace std;

int main(int argc, char *argv[]){ int p, pin=123456, pengulangan=1; char pi; do{ cout