int menuChoice;
do
{
printf ("Please enter a number from the menu.\n");
printf ("1. Inches to centimeters\n");
printf ("2. Feet to meters\n");
printf ("3. Miles to...
Type: Posts; User: Navar
int menuChoice;
do
{
printf ("Please enter a number from the menu.\n");
printf ("1. Inches to centimeters\n");
printf ("2. Feet to meters\n");
printf ("3. Miles to...
stick
#include <stdlib.h>
system("pause");
into the code...that'd be my guess...your window is disappearing too quickly to see the result.
You all helped me write these so, here they are:
// ASCII Converter
#include <stdio.h>
#include <stdlib.h>
main()
{
char c, i = 'y';
assuming you're using a Dos based system w/commmand prompt
system("color [attr]");
COLOR [attr]
attr Specifies color attribute of console output
I did get it to print specific number or decimals using %.nf...
%g does exactly what I want -
double sq = 0, bb = 0, ac4 = 0, z = 0;
sq = sqrt(bb - ac4);
z = -0.5*(b + sq);
x1 = z / a;...
short answer: return 0; ends the function
This is the book I use in Comp Solutions, part of EE program at UTA...
good book
Borlind is a decient compiler, one of the industry leaders.
double sq = 0, bb = 0, ac4 = 0, z = 0;
double sq2 = 0, x1 = 0, x2 = 0;
printf("%f+%fi, %f-%fi.\n\n", x1, sq, x1, sq);
However, the %d was also producing the same result.
Probly my...
I'm trying to display a list of doubles with out the trailing zeros.
This snipet is just the declaration and printf...the actual code is fine
I just need to modify these intergers for the printf
...
If you want a free compiler that does a decient job...and 1999 compliant - Dev-C is freeware.