Dev C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

for/while ciklusi stampanje imena N puta

Go down

for/while ciklusi stampanje imena N puta Empty for/while ciklusi stampanje imena N puta

Post  Don Corleone Wed Apr 13, 2011 11:09 pm


#include<stdio.h>
#include<conio.h>

int 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("%d. %s \n",i+1,ime);
}

printf("\n");
j=0;
while (j<n) //While ciklus
{
printf("%d. %s \n",j+1,ime);
j++;
}
getch();
}
Don Corleone
Don Corleone
Admin

Posts : 148
Join date : 2009-10-28
Age : 31
Location : Sombor - Serbia

https://programing.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum