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(); }

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 of algoritma dan contoh.docx

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