Sponsored Content
Full Discussion: float input
Top Forums Shell Programming and Scripting float input Post 302294881 by purva on Friday 6th of March 2009 04:51:38 AM
Old 03-06-2009
thanks

Thanx alot .
That is working.
But sorry I want to ask more
how can we implement end of file command in shell
means I have to insert nos. from user till he presses "ctrl c" and after that display their addition .
How can I do this.
Thanking in anticipation.
Have a good day.

Last edited by purva; 03-06-2009 at 05:59 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

expr+float argument: how can i do?

Hi everybody, I want to know how can i use the command 'expr' to manipulate float number , i have a shell bash and when (for example) i do: y1=`expr \( 1/ 16 \)` it returns 0 and if i do y1=`expr \( 1.6 / 16 \)` it returns non numeric argument. is there another command for mathematic... (4 Replies)
Discussion started by: mips
4 Replies

2. Shell Programming and Scripting

float comparison

I had a variable 1:80 8 in one varialbe say var=1:80 8 i comapred the below if then -- else ---- thought if condition is true its always going in the else condition....its not giving any compilation errror also....is there any problem bcoz of space... can some one help... (3 Replies)
Discussion started by: mkan
3 Replies

3. UNIX for Dummies Questions & Answers

Float calculations

As expr is used for integer calculations, which command is used for float calculations. (1 Reply)
Discussion started by: sharmavr
1 Replies

4. Programming

math.h: float ceilf(float x)

Good morning, I'm testing the use of ceilf: /*Filename: str.c*/ #include <stdio.h> #include <math.h> int main (void) { float ceilf(float x); int dev=3, result=0; float tmp = 3.444f; printf("Result: %f\n",ceilf(tmp)); return 0; } (1 Reply)
Discussion started by: jonas.gabriel
1 Replies

5. UNIX for Dummies Questions & Answers

input a float data and add them in shell in linux

I want to input a float data and add them in shell in linux. I am new user of it can anyone tell me how I can do it? thanx (5 Replies)
Discussion started by: purva
5 Replies

6. Programming

Float issues

i am adding two floating point numbers and i want to store in a character pointer... float f1 ; float f2 ; char *c = NULL; printf("Enter 2 floating numbers\n"); scanf("%f %f",&f1,&f2); f1 = f1+f2; sprintf(c, "%f", f1 ); when i execute this, i am... (3 Replies)
Discussion started by: pgmfourms
3 Replies

7. Shell Programming and Scripting

float to normal

I have a file with 2 columns . One of the line looks like the following. Is it possible to convert every float no in column 2 to integer. input NM_032881 6.03787973608527e-05 output 0.0000603787..... (2 Replies)
Discussion started by: quincyjones
2 Replies

8. Shell Programming and Scripting

Is there a simpler way to validate user input for float?

I'm trying to only read price (FLOAT (i.e 1.10, 3.14, etc etc)) If the input is just an integer, I will add a .00 behind. (i.e 3 becomes 3.00 , 20 becomes 20.00) If the input is without 2 decimal places, I'll add a 0. (i.e 3.1 becomes 3.10) I tried using the below code, it works but I don't... (6 Replies)
Discussion started by: andylbh
6 Replies

9. Red Hat

What is float IP?

:confused:We have two servers one active and one stand by as follows Active 202.61.9.9 Stand by 202.61.9.10 Float IP 202.61.9.8 What is use of this float IP? How it is configured? (1 Reply)
Discussion started by: manalisharmabe
1 Replies

10. Shell Programming and Scripting

Float array sum

Hi everyone, I'm having some trouble with float array. When i try to get the array sum with float numbers i get this error line 39: soma + 2.34 | bc: syntax error: invalid arithmetic operator (error token is ".34 | bc") 26 Somar() { 27 echo "Quantos numeros deseja somar?" 28 read... (4 Replies)
Discussion started by: berveglieri
4 Replies
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)
All times are GMT -4. The time now is 11:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy