SHOW:
|
|
- or go back to the newest paste.
1 | #include<math.h> | |
2 | #include<stdio.h> | |
3 | #include<stdlib.h> | |
4 | /* | |
5 | Trabalho Monique Beta:0001(algum dia terminarei) | |
6 | */ | |
7 | int main () | |
8 | { | |
9 | ||
10 | int cont_linha = 3; // define o numero de linhas | |
11 | int cont_coluna = 2 ; //define o numero de colunas | |
12 | - | float A[3][4]; |
12 | + | float A[3][4]; // aqui define o numero maximo de vetores |
13 | int i=0,j=0; | |
14 | int c=220, l=219,b=219 ; | |
15 | for(j=0;j<=cont_linha;j++) | |
16 | { | |
17 | printf("%c%c%c%c%c",b,b,b,b,b); | |
18 | } | |
19 | ||
20 | printf("%c\n", b); | |
21 | ||
22 | for (i=0;i<=cont_coluna;i++) | |
23 | { | |
24 | ||
25 | for(j=0;j<=cont_linha;j++) | |
26 | { | |
27 | ||
28 | ||
29 | if(i>j) | |
30 | { | |
31 | A[i][j]= (i*(3+j)); | |
32 | } | |
33 | if(i==j) | |
34 | { | |
35 | A[i][j]= ((9*i)-j); | |
36 | ||
37 | } | |
38 | if (i<j) | |
39 | { | |
40 | A[i][j]= (j*2); | |
41 | } | |
42 | ||
43 | ||
44 | if(j == 0 ) | |
45 | { | |
46 | printf("%c", l); | |
47 | } | |
48 | ||
49 | printf(" %2.f %c",A[i][j] ,l); | |
50 | } | |
51 | ||
52 | printf("\n"); | |
53 | for(j=0;j<=cont_linha;j++) | |
54 | { | |
55 | printf("%c%c%c%c%c",b,b,b,b,b); | |
56 | } | |
57 | printf("%c\n", b); | |
58 | ||
59 | } | |
60 | ||
61 | printf("\n\n\n\n"); | |
62 | system("pause"); | |
63 | return 0; | |
64 | } |