#include<stdio.h>
#include<conio.h>
main(){
char ime[20];
int i,j,n;
printf("Unesite ime za stampanje \n");
printf("ime=");scanf("%s",&ime);
printf("\n\n");
printf("Koliko puta zelis da stampas ime \n");
printf("n=");scanf("%d",&n);
for (int i=0;i<n;i++){ // for ciklus
printf("for:%d. %s \n",i+1,ime);
}
printf("\n");
j=0;
while (j<n) //While ciklus
{
printf("while:%d. %s \n",j+1,ime);
j++;
}
int k=0;
do {
printf("do:%d. %s \n",k+1,ime);
k++;
} while (k<n);
getch();
}
#include<conio.h>
main(){
char ime[20];
int i,j,n;
printf("Unesite ime za stampanje \n");
printf("ime=");scanf("%s",&ime);
printf("\n\n");
printf("Koliko puta zelis da stampas ime \n");
printf("n=");scanf("%d",&n);
for (int i=0;i<n;i++){ // for ciklus
printf("for:%d. %s \n",i+1,ime);
}
printf("\n");
j=0;
while (j<n) //While ciklus
{
printf("while:%d. %s \n",j+1,ime);
j++;
}
int k=0;
do {
printf("do:%d. %s \n",k+1,ime);
k++;
} while (k<n);
getch();
}
No comments:
Post a Comment