Skip to content

Instantly share code, notes, and snippets.

@IanCarloz
Created September 6, 2017 16:05
Show Gist options
  • Save IanCarloz/4b839297ff3a982bbeb0816c6427a3aa to your computer and use it in GitHub Desktop.
Save IanCarloz/4b839297ff3a982bbeb0816c6427a3aa to your computer and use it in GitHub Desktop.
#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