Click here to Skip to main content
15,891,033 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Linear line Pin
flippydeflippydebop25-Jul-07 20:30
flippydeflippydebop25-Jul-07 20:30 
GeneralRe: Linear line Pin
flippydeflippydebop25-Jul-07 20:26
flippydeflippydebop25-Jul-07 20:26 
GeneralRe: Linear line Pin
Dan Neely26-Jul-07 2:19
Dan Neely26-Jul-07 2:19 
GeneralRe: Linear line Pin
flippydeflippydebop26-Jul-07 2:25
flippydeflippydebop26-Jul-07 2:25 
AnswerRe: Linear line Pin
CPallini25-Jul-07 11:12
mveCPallini25-Jul-07 11:12 
GeneralRe: Linear line Pin
Luc Pattyn25-Jul-07 11:16
sitebuilderLuc Pattyn25-Jul-07 11:16 
GeneralRe: Linear line Pin
CPallini25-Jul-07 11:24
mveCPallini25-Jul-07 11:24 
AnswerRe: Linear line Pin
Habib Ahmed Bhutto30-Jul-07 13:24
Habib Ahmed Bhutto30-Jul-07 13:24 
hi flippydeflippydebop
D'Oh! | :doh: "entering 5 readings" u mean input 5 values then in each reading u will get a point's value mean(x,y)
it means
int x[5], y[5]
for( i=0; i<5; i++ )
read x[i], y[i]

resultX = x[0] - x[1] - x[2] - x[3] - x[4]
resultY = y[0] - y[1] - y[2] - y[3] - y[4]

if( ( resultX == 0 ) and ( resultY == 0 ) )
print "line is linear"
else
print "line is not linear"

i think this is the solution if it is true plz inform me if it is wrong then also inform me plz..

in case it is true u can further enhance and can be maked easy and powerful then this.

plz inform me about its correctness


habib bhutto

AnswerRe: Linear line Pin
Habib Ahmed Bhutto30-Jul-07 13:32
Habib Ahmed Bhutto30-Jul-07 13:32 
GeneralRe: Linear line Pin
Dan Neely31-Jul-07 2:09
Dan Neely31-Jul-07 2:09 
AnswerRe: Linear line Pin
Russell'3-Aug-07 4:19
Russell'3-Aug-07 4:19 
GeneralRe: Linear line Pin
Russell'3-Aug-07 4:20
Russell'3-Aug-07 4:20 
AnswerRe: Linear line Pin
stevepqr7-Aug-07 6:02
stevepqr7-Aug-07 6:02 
Questionimages Pin
zainab ibrahim24-Jul-07 22:47
zainab ibrahim24-Jul-07 22:47 
AnswerRe: images Pin
shiraztk26-Jul-07 9:24
shiraztk26-Jul-07 9:24 
QuestionFinding a point on a circle [modified] Pin
max2929720-Jul-07 12:36
max2929720-Jul-07 12:36 
AnswerRe: Finding a point on a circle [modified] Pin
Luc Pattyn20-Jul-07 16:23
sitebuilderLuc Pattyn20-Jul-07 16:23 
GeneralRe: Finding a point on a circle Pin
max2929720-Jul-07 20:09
max2929720-Jul-07 20:09 
GeneralRe: Finding a point on a circle Pin
Luc Pattyn21-Jul-07 0:49
sitebuilderLuc Pattyn21-Jul-07 0:49 
GeneralRe: Finding a point on a circle Pin
Paul Conrad21-Jul-07 5:24
professionalPaul Conrad21-Jul-07 5:24 
GeneralRe: Finding a point on a circle Pin
Luc Pattyn21-Jul-07 6:06
sitebuilderLuc Pattyn21-Jul-07 6:06 
GeneralRe: Finding a point on a circle Pin
Paul Conrad21-Jul-07 6:11
professionalPaul Conrad21-Jul-07 6:11 
GeneralRe: Finding a point on a circle Pin
max2929721-Jul-07 16:31
max2929721-Jul-07 16:31 
GeneralRe: Finding a point on a circle Pin
Paul Conrad21-Jul-07 16:53
professionalPaul Conrad21-Jul-07 16:53 
GeneralRe: Finding a point on a circle Pin
max2929721-Jul-07 17:52
max2929721-Jul-07 17:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.