473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Subtraction using perl

1
Hi,
Iam new to perl. Please help me in solving this:
Algo:
1. Take 3 inputs (P1, P2, P3)
2. print header as P1, P2, P3
3. For each input, print numbers under the heading starting from 0.
4. After printing 3 values, give new line so that 4th value will come under P1 again.
5. Find the difference between each row values and print along with current value.
6. do 3,4,5 in while loop (infinite loop).
---
output shoudl be like this:
P1 P2 P3
(0,0) (1,0) (2,0)
(3,3) (4,3) (5,3)
(6,3) (7,3) (8,3)...................
---

Thanks
Sep 19 '06 #1
0 1240

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: August1 | last post by:
I've written an interface and implementation file along with a client source file that allows the use of an overloaded subtraction operator. However, when using the program, I'm running into a...
5
by: bruce.james.lee | last post by:
hi i have a problem with integer subtraction in C. printf("%d", c < (a - b)); a is got from a #define and is 0x80000000 and b is got from input and is also 0x80000000. c is ffffffff (-1)....
20
by: junky_fellow | last post by:
Hi, In my previous post I asked if sizeof may be implemented as a function. Somebody pointed a link that says that sizeof may calculated as follows with a warning that it is not guaranteed to...
5
by: un1xg33k | last post by:
Is there a php function to determine the difference between dates. I'd like to take a birthdate and then determine how old a person is dynamically and simply return the age in years. TIA
3
by: sttip | last post by:
Hi, I'm a student taking a beginner's c++ course. I am trying to write a program that performes simple math operations on random numbers. I am using the srand(int(time(0))); function to generate...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
7
by: gsaray101 | last post by:
there is a csv file like this: date, val1, val2, val3, val4 etc 1/2/2007, 1, 4, 5, 6 1/3/2007, 2, 5, 7, 10 1/5/2007, 5, 6, 8, 11 what I need...
5
by: Keflavich | last post by:
Hey, I have a bit of code that died on a domain error when doing an arcsin, and apparently it's because floating point subtraction is having problems. I know about the impossibility of storing...
1
by: macrun95 | last post by:
I need to take a date, ie. 031708, and subtract one day from it. I have looked on the Internet to find a way to do this but all I have found is very complex and pretty old (from the late '90s). Is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.