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(){ | |
/* 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]); |
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 numero; | |
printf("Escribe un numero del 1 al 12: "); | |
scanf("%d", &numero); | |
switch (numero) { | |
case 1: | |
printf("Enero.\n"); |
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
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 |
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> | |
// 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() |
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> | |
/* | |
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} | |
*/ |
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 <stdlib.h> | |
int main() | |
{ | |
int nMotos, nTodoterrenos, nSedan, nDeportivos; | |
int lMotos, lTodoterrenos, lSedan, lDeportivos; | |
int tMotos, tTodoterrenos, tSedan, tDeportivos; | |
int total; |
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 <stdlib.h> | |
int main() | |
{ | |
int nMotos, nTodoterrenos, nSedan, nDeportivos; | |
int lMotos, lTodoterrenos, lSedan, lDeportivos; | |
int tMotos, tTodoterrenos, tSedan, tDeportivos; | |
int total; |
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 <stdlib.h> | |
int main() | |
{ | |
int nMotos, nTodoterrenos, nSedan, nDeportivos; | |
int lMotos, lTodoterrenos, lSedan, lDeportivos; | |
int tMotos, tTodoterrenos, tSedan, tDeportivos; | |
int total; |
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
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) |