473,387 Members | 1,575 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,387 software developers and data experts.

pls help i dont want the remainders:

24
hi,iam practising a prog that is in 5000sec there r how many sec and how many hour.i have done everything but cant able to roundoff the remainder.can anyone helpme pls.
Sep 7 '07 #1
8 1150
numberwhun
3,509 Expert Mod 2GB
Could you please explain what the goal of your program is more clearly. This post is so broken up I cannot really determine what it is you want or are trying to do. I understand there is some remainder, but nothing else. Why not post your code here (surrounded by code tags please) and we can try to help you.

Regards,

Jeff
Sep 7 '07 #2
KevinADC
4,059 Expert 2GB
Judging by their first thread and this one, humaid is a student.
Sep 7 '07 #3
numberwhun
3,509 Expert Mod 2GB
I was already assuming that but was going to wait until the next post to let them know that we would be glad to help them if they got stuck, but have a "we won't do your homework" policy on TSDN.
Sep 7 '07 #4
Kelicula
176 Expert 100+
It a round about way, but i am still learning regular expressions:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl -w
  2. use strict;
  3.  
  4. my $num = 1342;
  5. my $next = $num / 28;
  6.  
  7. my @it = split(/\./, $next);
  8.  
  9. print "$it[0]";
Sep 8 '07 #5
Kelicula
176 Expert 100+
It a round about way, but i am still learning regular expressions:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl -w
  2. use strict;
  3.  
  4. my $num = 1342;
  5. my $next = $num / 28;
  6.  
  7. my @it = split(/\./, $next);
  8.  
  9. print "$it[0]";

Oppps! sorry it doesn't round.

Here:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl -w
  2.  
  3. my $num = 1342;
  4. my $next = $num / 28;
  5.  
  6. my @it = split(/\./, $next);
  7.  
  8.  
  9. if(substr($it[1], 0, 1) >= 5){
  10. $it[0] += 1;
  11. }
  12.  
  13. print "$it[0]";
  14.  
Sep 8 '07 #6
KevinADC
4,059 Expert 2GB
for rounding off of most numbers use the sprintf() function.
Sep 8 '07 #7
numberwhun
3,509 Expert Mod 2GB
Oppps! sorry it doesn't round.

Here:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/local/bin/perl -w
  2.  
  3. my $num = 1342;
  4. my $next = $num / 28;
  5.  
  6. my @it = split(/\./, $next);
  7.  
  8.  
  9. if(substr($it[1], 0, 1) >= 5){
  10. $it[0] += 1;
  11. }
  12.  
  13. print "$it[0]";
  14.  
I know you were trying to be helpful, but if you note, Kevin and I were mentioning that this OP sounds like a student. TSDN is not in the practice of supplying students the code for their classes, thus, inhibiting their learning. There are students, unfortunately, who would rather have others write their code and breeze through a class than learn anything.

Please read a post and question as to whether or not it could be a student.

Regards,

Jeff
Sep 8 '07 #8
Kelicula
176 Expert 100+
I know you were trying to be helpful, but if you note, Kevin and I were mentioning that this OP sounds like a student. TSDN is not in the practice of supplying students the code for their classes, thus, inhibiting their learning. There are students, unfortunately, who would rather have others write their code and breeze through a class than learn anything.

Please read a post and question as to whether or not it could be a student.

Regards,

Jeff
OK, never thought about it like that.

Thanks!
Sep 8 '07 #9

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

Similar topics

19
by: Wouter | last post by:
Hi, I try to make when i send a <form> that he dont open a new window. Is there someone who know how i can make this whit javascript ? Greets Wouter
3
by: rcamarda | last post by:
I do weekly full backups of my SQL databases via a scheduled T-SQL job. I noticed that I have some static databases that dont normally change, so I dont want to back it up if it has not changed,...
2
by: Douglas | last post by:
I have a Vehicle MOT field in my table which i have as a Date field I dont really want to hold the year, just 'dd mmm' as MOTs are the same date every year. I have the field on my form as a...
1
by: Merrua | last post by:
I dont understand how to do this I created a dialog based project and that is fine for most of my programming project, but one dialog box is going to generate a graph, and as far as i know from...
0
by: Josip Habjan | last post by:
Hi, I have VS 2003 installed. In VS 2002 all worked fine, but... when I reinstall my PC and put VS 2003, ASP.NET dont work propertly.. All other controls are fine, only DataGrid dont exist......
16
by: NewToCPP | last post by:
I have seen at several places that C++ programmers writing for RealTime Embedded applications dont use Exception Handling. They dont like Throw/catch concept. WHY? Thanks.
19
by: so many sites so little time | last post by:
the table is head the colunm is called body <?php //show_site.php // This script retrieves blog entries from the database. // Address error handing. ini_set ('display_errors', 1);...
2
by: hojjatnikan | last post by:
please help me this code 62EH&5gx0wiqoQFw is this name ( Belux) but i dont know how convert it i dont know the algorithm of this code plead help me
6
by: Anarchist | last post by:
I am working with VB 2005. My problem is that having an opened form and pressing a key on it I want to open another form, still executing the code on the original form but I dont want to allow the...
1
by: suvaline | last post by:
I dont know much about VBA, but maybe somebody can help me ;) I have this kind of SUB .. Sub kama2() Worksheets("kama").Activate Range("A51").Select Selection.Hyperlinks(1).Follow...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.