You are on page 1of 2

1 #include <stdio.

h>
2 #include <stdlib.h>
3 void Functie_problema1()
4 {
5 int n,i;
6 printf("\nSe da un numar natural n. Afisati in ordine crescatoare primele n numere naturale nenule.\n");
7 printf("n="); scanf("%d",&n);
8 for(i=1;i<n;i++)
9 printf("%d, ",i);
10 printf("%d.\n",i);
11 }
12 void Functie_problema2()
13 {
14 int n;
15 printf("n="); scanf("%d",&n);
16 }
17 void Functie_problema3()
18 {
19 int n;
20 printf("n="); scanf("%d",&n);
21 }
22 void Functie_problema4()
23 {
24 int n;
25 printf("n="); scanf("%d",&n);
26 }
27 void Functie_problema5()
28 {
29
30 }
31 void Functie_problema6()
32 {
33
34 }
35 void Functie_problema7()
36 {
37
38 }
39 void Functie_problema8()
40 {
41
42 }
43 void Functie_problema9()
44 {
45
46 }
47 int main()
48 {
49 int alegere;
50 do
51 {
52 printf("<1> Rezolva problema 1\n");
53 printf("<2> Rezolva problema 2\n");
54 printf("<3> Rezolva problema 3\n");
55 printf("<4> Rezolva problema 4\n");
56 printf("<5> Rezolva problema 5\n");
57 printf("<6> Rezolva problema 6\n");
58 printf("<7> Rezolva problema 7\n");
59 printf("<8> Rezolva problema 8\n");
60 printf("<9> Rezolva problema 9\n");
61 printf("Optiunea: ");scanf("%d",&alegere);
62 switch (alegere)
63 {
64 case 1:Functie_problema1();break;
65 case 2:Functie_problema2();break;
66 case 3:Functie_problema3();break;
67 case 4:Functie_problema4();break;
68 case 5:Functie_problema5();break;
69 case 6:Functie_problema6();break;
70 case 7:Functie_problema7();break;
71 case 8:Functie_problema8();break;
72 case 9:Functie_problema9();break;
73 default: alegere=0;
74 }
75 }
76 while(alegere);
77 printf("\nMultumesc!\n");
78
79 }

You might also like