Skip to content

Instantly share code, notes, and snippets.

View IanCarloz's full-sized avatar

Ian C. Velázquez IanCarloz

View GitHub Profile
class Figura:
def __init__(self, name, height, width):
self.name = name
self.height = height
self.width = width
def area(self):
area = self.height * self.width
print('a=', area)
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nMotos, nTodoterrenos, nSedan, nDeportivos;
int lMotos, lTodoterrenos, lSedan, lDeportivos;
int tMotos, tTodoterrenos, tSedan, tDeportivos;
int total;
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nMotos, nTodoterrenos, nSedan, nDeportivos;
int lMotos, lTodoterrenos, lSedan, lDeportivos;
int tMotos, tTodoterrenos, tSedan, tDeportivos;
int total;
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nMotos, nTodoterrenos, nSedan, nDeportivos;
int lMotos, lTodoterrenos, lSedan, lDeportivos;
int tMotos, tTodoterrenos, tSedan, tDeportivos;
int total;
#include <stdio.h>
/*
La instruccion while se utiliza para generar bucles (ciclos):
hasta satisfacer la condicion, un grupo de instrucciones se
ejecuta de forma repetida.
la forma general es:
while(condicion){instrucciones}
*/
#include <stdio.h>
// Como funcionan los operadores de relacionales
/*
Observe el siguiente codigo y realice los cambios pertinentes
para que la salida muestre los operadores relacionales y los resultados
correctamente.
*/
int main()
https://pablohaya.com/2013/10/12/diferencia-entre-scanf-gets-y-fgets/
https://raw.githubusercontent.com/google/styleguide/gh-pages/google-c-style.el
http://google.github.io/styleguide/
http://ieng9.ucsd.edu/~cs30x/indhill-cstyle.html
http://homepages.inf.ed.ac.uk/dts/pm/Papers/nasa-c-style.pdf
https://users.ece.cmu.edu/~eno/coding/CCodingStandard.html#gconstants
#include <stdio.h>
int main() {
int numero;
printf("Escribe un numero del 1 al 12: ");
scanf("%d", &numero);
switch (numero) {
case 1:
printf("Enero.\n");
#include<stdio.h>
int main(){
/* 2D array declaration*/
int disp[10][2];
/*Counter variables for the loop*/
int i, j;
for(i=0; i<10; i++) {
for(j=0;j<2;j++) {
printf("Enter value for disp[%d][%d]:", i, j);
scanf("%d", &disp[i][j]);