10-26-2012
Are you printing it as a float...printf("%f\n", kilometers)
9 More Discussions You Might Find Interesting
1. Programming
Alright, umm i cant get this to work.
im looking at some example and a book i have.
when i try to compile my program i get an error message.
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. I did #include<math.h> after my... (2 Replies)
Discussion started by: primal
2 Replies
2. Programming
Hi, I got an easy problem for you but really difficult for me 'cause I am pretty new to this field
I got header file <math.h> included in my .c file , then I write the code as below:
k = sqrt(i); /* both variables k and i are int */
then I cc temp.c
it says like this
undefined... (4 Replies)
Discussion started by: blf0
4 Replies
3. Programming
I want to calculate secant method using C language
That is a program---->
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
main()
{
double fx(double x);
double x0,x1,x2,f0,f1,f2,err;
int n,i;
printf("\n\n f(x) =x*x*x-5*x-7");
printf("\n\nEnter an interval in"
... (4 Replies)
Discussion started by: cdfd123
4 Replies
4. Programming
Hey all,
How do I link the math library in a gnu make makefile? I have tried using -lm with the CFLAGS varibale - flags like -Wall and -ggdb work, but -lm does not. I am running gcc - 4.1.2 on a linux machine. (2 Replies)
Discussion started by: kermit
2 Replies
5. UNIX for Dummies Questions & Answers
I have 2 variables
a=2
b=1
i want to add a and b
how do i do this in unix using just the echo command and by assigning it to a different variable like c? (13 Replies)
Discussion started by: khestoi
13 Replies
6. Shell Programming and Scripting
$ x=1
$ y=1.5
$ z=$((x*y))
bash: 1.5: syntax error: invalid arithmetic operator (error token is ".5")
What's wrong? (2 Replies)
Discussion started by: rockbike
2 Replies
7. Shell Programming and Scripting
I am trying to do some math, so that I can compare the average of six numbers to a variable.
Here is what it looks like (note that when I divide really big numbers, it isn't a real number):
$ tail -n 6 named.stats | awk -F\, '{print$1}'
1141804
1140566
1139429
1134210
1084682
895045... (3 Replies)
Discussion started by: brianjb
3 Replies
8. UNIX for Dummies Questions & Answers
I am struggling with scripting this challenge a friend and I have.
You have file1 and its contents is a single number
you have file 2 and its contents are a different number
you want to add file1 to file2 and have the output be put into file3 (3 Replies)
Discussion started by: minkyboodle
3 Replies
9. UNIX for Dummies Questions & Answers
i have file (my_file.txt) that looks like this:
000000000000010000
000000000000010000
000000000000005000
000000000000005000
000000000000005000
000000000000005000
000000000000005000
000000000000005000
000000000000005000
000000000000005000
all said and one, it should look... (11 Replies)
Discussion started by: lawsongeek
11 Replies
LEARN ABOUT DEBIAN
transforms
transforms(3U) InterViews Reference Manual transforms(3U)
NAME
MoveCmd, RotateCmd, ScaleCmd - coordinate transformation commands
SYNOPSIS
#include <Unidraw/Commands/transforms.h>
DESCRIPTION
The Unidraw library predefines three purely interpretive commands for performing coordinate transformations: MoveCmd defines a translation,
RotateCmd defines a rotation, and ScaleCmd defines a two-dimensional scaling.
MOVECMD PUBLIC OPERATIONS
MoveCmd(ControlInfo*, float dx = 0, float dy = 0)
MoveCmd(Editor* = nil, float = 0, float = 0)
Construct a new MoveCmd, specifying the translation distances in the horizontal (dx) and vertical (dy) dimensions.
void GetMovement(float&, float&)
Return the translation distances specified in the constructor.
ROTATECMD PUBLIC OPERATIONS
RotateCmd(ControlInfo*, float = 0)
RotateCmd(Editor* = nil, float = 0)
Construct a new RotateCmd, specifying the rotation angle in degrees.
float GetRotation()
Return the rotation angle specified in the constructor.
SCALECMD PUBLIC OPERATIONS
ScaleCmd(
ControlInfo*, float sx = 1, float sy = 1, Alignment = Center
)
ScaleCmd(Editor* = nil, float = 1, float = 1, Alignment = Center)
Construct a new ScaleCmd, specifying the scaling factors in the horizontal (sx) and vertical (sy) dimensions and an alignment sug-
gesting the point about which the component should be scaled.
void GetScaleing(float&, float&)
Alignment GetAlignment()
Return the scaling factors and alignment specified in the constructor.
SEE ALSO
Command(3U)
Unidraw 24 January 1991 transforms(3U)