1.
#include<conio.h>
#include<stdio.h>
void main()
{
clrscr();
int i=1;
do
{
printf("%d Perulangan menggunakan do-while\n",i);
i++;
}while(i<10);
getch();
}
2.
#include<conio.h>
#include<stdio.h>
void main()
{
clrscr();
int i=1;
printf(" \n\nMenampilkan bilangan berurut menggunakan do-while\n");
do
{
printf(" %d\n",i);
i++;
}while(i<=10);
getch();
}
No comments:
Post a Comment