gaasc
Desperately looking for a title
I've been having a few problems in my programming class lately so i thought that maybe all of you generous people of FG could help me sort them out so i don't fuck up in the future.
The ghost problem of today;
Compiler says 0 errors, 0 warnings, yet it doesn't run properly.
Thanks in advance to everyone that replies
The ghost problem of today;
Code:
#include <stdio.h>
#include <windows.h>
char nom[28] , ser[1];
int vel ;
double imp, total, subt;
main ()
{
printf ("\t KJT Networks \n");
printf ("\t *** ******** \n");
printf ("\t\n (A) Servicio de Dial-up");
printf ("\t\n (B) Internet dedicado");
printf ("\n\n Nombre del cliente: ");
gets ("nom");
printf ("\t\n servicio deseado: ");
scanf ("%s", ser);
system ("CLS");
if (ser == "A")
{
printf ("\tKJT Networks\n");
printf ("\t*** ********\n");
printf ("\n\n\nNombre de el cliente: %s", nom);
subt = 350;
imp = subt + (subt*0.12);
total = subt + imp ;
printf ("\nSubtotal: %.2f", subt);
printf ("\nImpuesto : %.2f", imp);
printf ("\nTotal: %.2f", total);
}
else
{
printf ("\tKJT Networks\n");
printf ("\t*** ********\n");
printf ("\t\nSeleccione el servicio deseado");
printf ("\t\n[1] Internet de 128 Kb");
printf ("\n\t[2] Internet de 256 Kb");
printf ("\n\t[3] Internet de 512 Kb");
printf ("\n\t[4] Internet de mas de 512 Kb");
printf ("\n\n\t Seleccione su servicio: ");
scanf ("%d", vel);
system ("CLS");
if (vel == 1)
subt = 1300;
else
if (vel == 2)
subt = 1500;
else
if (vel == 3)
subt = 1800;
else
subt = 2750;
printf ("\nSubtotal: %.2f", subt);
printf ("\nImpuesto : %.2f", imp);
printf ("\nTotal: %.2f", total);
}
return 0 ;
}
Compiler says 0 errors, 0 warnings, yet it doesn't run properly.
Thanks in advance to everyone that replies
Last edited by a moderator: