Created
September 6, 2017 16:05
-
-
Save IanCarloz/4b839297ff3a982bbeb0816c6427a3aa to your computer and use it in GitHub Desktop.
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; | |
nMotos = 32; | |
nTodoterrenos = 11; | |
nSedan = 21; | |
nDeportivos = 4; | |
lMotos = 40; | |
lTodoterrenos = 65; | |
lSedan = 39; | |
lDeportivos = 45; | |
tMotos = nMotos * lMotos; | |
tTodoterrenos = nTodoterrenos * lTodoterrenos; | |
tSedan = nSedan * lSedan; | |
tDeportivos = nDeportivos * lDeportivos; | |
total = tMotos + tTodoterrenos + tSedan + tDeportivos; | |
second(); | |
return total; | |
} | |
void second() | |
{ | |
int a, b; | |
int suma, resta, multiplicacion; | |
float division; | |
bool mayora100; | |
printf("Please input an integer value for a: "); | |
scanf("%d", &a); | |
printf("Please input an integer value for b: "); | |
scanf("%d", &b); | |
suma = a + b; | |
if (suna > 100) { | |
mayora100 = t | |
} | |
printf("Sum: %d\n", suma); | |
resta = a - b; | |
printf("res: %d\n", resta); | |
multiplicacion = a * b; | |
printf("mult: %d\n", multiplicacion); | |
division = (float) a / b; | |
printf("div: %f\n", division); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment