Search found 2 matches

by defender510
27 Jun 2012, 17:59
Forum: Programare generala
Topic: Problema simpla de C
Replies: 2
Views: 2721

Re: Problema simpla de C

Multumesc frumos pentru raspuns :whorship: ,uitasem de break;
by defender510
27 Jun 2012, 09:56
Forum: Programare generala
Topic: Problema simpla de C
Replies: 2
Views: 2721

Problema simpla de C

Salut! #include<stdio.h> int main(){ int a[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int n, i; printf( "Introduceti un intreg intre 1 si 10: \n"); scanf("%d", &n); for (i=0; i< n; i++) switch (a ) { case 5: printf("%d ", ++ i ) ; case 10: printf("-%d ", ++ i ); default: printf("%d ", i ); } return(0); } In...