This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main () { | |
int matriz [4][4]={{'_','*','_','*'},{'!','_','_','_'},{'*','_','*','*'},{'*','_','*','_'}}; | |
int i,j; | |
int x,y; | |
int error=0; | |
while (error<3){ | |
for (i=0; i<4; i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main () { | |
int matriz[4][4]={{3,18,9,0},{20,-50,7,-1},{5,7,8,4},{-5,-20,31,18}}; | |
int ren, col; | |
for(ren=0; ren<4;ren++){ | |
for (col=0; col<4; col++){ | |
printf("n%d", matriz[ren][col]); | |
if (matriz[ren][col]%4==0 && matriz[ren][col]>0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
int matriz[4][4]={{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}; | |
int ren, col; | |
for(ren=0; col<4; ren++){ | |
for(col=0; col<4; col++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <stdio.h> | |
# include <iostream.h> | |
int main() | |
{ | |
int numeros[10] = {10, -5, 3, -10, 13, -19, 20, -12, 7, -8}; | |
int suma = 0; | |
for (int i = 0; i < 10; i++) | |
suma += numeros [i]; | |
printf ("la sumatoria es igual a:\t %d", suma); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
int op; | |
printf("\n1-.Comer\n2-.Pagar\n3-.Tomar\n4-.Correr\n"); | |
scanf("%d", &op); | |
switch (op) | |
{ | |
case 1 : | |
printf("\nPues come"); | |
menu(); | |
break; |