Skip to content

Instantly share code, notes, and snippets.

View RhoKratos's full-sized avatar
🎯
Focusing

Rhodrigo RhoKratos

🎯
Focusing
View GitHub Profile
#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++){
#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 );
#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++){
@RhoKratos
RhoKratos / .c
Created October 15, 2017 05:21
Suma de arreglo de 10 números (Básico)
# 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);
@RhoKratos
RhoKratos / .c
Created October 15, 2017 04:37
Menuú
{
int op;
printf("\n1-.Comer\n2-.Pagar\n3-.Tomar\n4-.Correr\n");
scanf("%d", &op);
switch (op)
{
case 1 :
printf("\nPues come");
menu();
break;