Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > Perl

Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-12-2008, 06:49 AM
gopalsd gopalsd is offline
Newbie
 
Join Date: Feb 2008
Posts: 2
Rep Power: 0
gopalsd is on a distinguished road
Default help us resolve the perl program problem

Dear Friends,

Anyone pls reolve mentioned problem.............
Code:
#!/usr/bin/perl
@data=N;
$sum=0;
print"enter the required No. of numbers to be inputed : f";
$N=<STDIN>;
print"enter the number";
for($i=0;$i<$N;$i+=1)
{$data[$i]=<STDIN>;
# chomp $data[$i];
$sum=$sum + $data[$i];}

# for($j=0;$j=$data[$i];$j+=1)
print"the entered numbers are",@data,"\n";
print"sum of the number:",$sum,"\n";
print"Average value the numbers:",$sum/$N,"\n";

@sorting=sort(@data);
$lengt=@data;
for ($j=0;$j < $lengt;$j++)
{# print $sorting[$j],"\n";
}

$X= (@sorting[($j-1)/2]+ @sorting[$j/2])/2;
print"the median is :$X";
QUES: the median is the middle value if the numbers have been sorted in
ascending order (for even numbers of values it is your choice to pick
the first or second of the middle numbers.

Last edited by v0id; 02-12-2008 at 07:01 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-12-2008, 07:01 AM
v0id's Avatar   
v0id v0id is offline
Super Moderator
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,286
Last Blog:
CherryPy(thon)
Rep Power: 24
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

Remember to use code-tags next time you're posting some code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-12-2008, 09:44 AM
fahlyn's Avatar   
fahlyn fahlyn is offline
Learning Programmer
 
Join Date: Nov 2007
Age: 25
Posts: 35
Rep Power: 3
fahlyn is on a distinguished road
Send a message via ICQ to fahlyn Send a message via AIM to fahlyn Send a message via MSN to fahlyn Send a message via Yahoo to fahlyn
Default

so what's your problem?
__________________
Visit My Google Group Here: Web Development Innovation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-15-2008, 06:09 AM
gopalsd gopalsd is offline
Newbie
 
Join Date: Feb 2008
Posts: 2
Rep Power: 0
gopalsd is on a distinguished road
Default can u resolve this problem

Quote:
Originally Posted by v0id View Post
Remember to use code-tags next time you're posting some code.
Hi,
next time i will remember the code-tags ,can u resolve this problem for me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-15-2008, 07:20 AM
fahlyn's Avatar   
fahlyn fahlyn is offline
Learning Programmer
 
Join Date: Nov 2007
Age: 25
Posts: 35
Rep Power: 3
fahlyn is on a distinguished road
Send a message via ICQ to fahlyn Send a message via AIM to fahlyn Send a message via MSN to fahlyn Send a message via Yahoo to fahlyn
Default

I'd still like to know what your question is. You posted your code, along with a comment, but never asked a question.
__________________
Visit My Google Group Here: Web Development Innovation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 02-24-2008, 08:35 PM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 89
Rep Power: 6
KevinADC is on a distinguished road
Default

The question is: will somone do my school/class assignment for me?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-24-2008, 10:18 PM
fahlyn's Avatar   
fahlyn fahlyn is offline
Learning Programmer
 
Join Date: Nov 2007
Age: 25
Posts: 35
Rep Power: 3
fahlyn is on a distinguished road
Send a message via ICQ to fahlyn Send a message via AIM to fahlyn Send a message via MSN to fahlyn Send a message via Yahoo to fahlyn
Default

Quote:
Originally Posted by KevinADC View Post
The question is: will somone do my school/class assignment for me?
that's what it sounds like to me too.
__________________
Visit My Google Group Here: Web Development Innovation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-25-2008, 12:54 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 89
Rep Power: 6
KevinADC is on a distinguished road
Default

Judging by his code he is not going to get a good grade/mark. Hopefully that is not what they are teaching in school/class these days, that be some nasty looking perl code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-25-2008, 05:02 PM
fahlyn's Avatar   
fahlyn fahlyn is offline
Learning Programmer
 
Join Date: Nov 2007
Age: 25
Posts: 35
Rep Power: 3
fahlyn is on a distinguished road
Send a message via ICQ to fahlyn Send a message via AIM to fahlyn Send a message via MSN to fahlyn Send a message via Yahoo to fahlyn
Default

lol, I agree....I really like the misspelling of the word "length".
__________________
Visit My Google Group Here: Web Development Innovation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unique & Complex Sorting Program ryan.devani C and C++ 3 01-17-2008 12:28 PM
Help with Square root and calculator program!!! 123456789asdf C and C++ 10 12-02-2007 04:35 PM
Weird problem with code, functions when not suppose to Murph-s C and C++ 0 05-14-2007 07:11 PM


All times are GMT -5. The time now is 02:16 PM.

Contest Stats

John ........ 167.00000
Xav ........ 164.00000
dargueta ........ 148.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

Ads