Hey did u try the above programmes with a language u know ........if u r also using java then make some improvements on the code and post here !!! Ill post more problems later !!!!!!!

I'll give a try 

Hey did u try the above programmes with a language u know ........if u r also using java then make some improvements on the code and post here !!! Ill post more problems later !!!!!!!

I'll give a try 

Hey Guys check out this code !!!! get two points and return the line !! checked for all occurrences !!!! Please tell me if there are any errors !!!!!!
Code:package line; import java.util.Scanner; /** * * @author lakmal */ class Line { Points p1=new Points(); Points p2=new Points(); static boolean isContinue=true; static Scanner input=new Scanner(System.in); static String op; void getLine(Points p1,Points p2){ System.out.println("Your two points are "); System.out.println("("+p1.xCordinate+","+p1.yCordinate+")"); System.out.println("("+p2.xCordinate+","+p2.yCordinate+")"); double yCoeff=p2.xCordinate-p1.xCordinate; double xCoeff=p2.yCordinate-p1.yCordinate; double constant=p1.yCordinate*(p2.xCordinate-p1.xCordinate)-p1.xCordinate*(p2.yCordinate-p1.yCordinate); System.out.println("Your Line is:"); if (yCoeff==0){ System.out.println("X="+p2.xCordinate); } else if (xCoeff==0) System.out.println("Y="+p2.yCordinate); else{ if (constant!=0){ if ((constant/yCoeff)>0){ op = "+"; } else if ((constant/yCoeff)<0){ op=""; } System.out.println("Y="+xCoeff/yCoeff+"X" + op + (constant)/yCoeff); } else System.out.println("Y="+ xCoeff/yCoeff+"X"); } } void getPoints(){ System.out.println("Enter your First Point:"); System.out.print("X="); this.p1.xCordinate=input.nextInt(); System.out.print("Y="); this.p1.yCordinate=input.nextInt(); System.out.println("Enter your Second Point:"); System.out.print("X="); this.p2.xCordinate=input.nextInt(); System.out.print("Y="); this.p2.yCordinate=input.nextInt(); this.getLine(this.p1,this.p2); } public static void main(String[] args) { do { Line l1=new Line(); l1.getPoints(); System.out.println("Do you want to Continuw with anothe line:(y/n)"); char state=input.next().charAt(0); if (state=='n') isContinue=false; } while (isContinue=true); } } class Points { int xCordinate; int yCordinate; }
Happy Codings !!!!! For More Java And C++ codes Visit
http://www.elakiri.com/forum/showthread.php?t=245895

Can you bit explain whatz this coding ?? I mean what its doing ?? 
Can you bit explain whatz this coding ?? I mean what its doing ??
![]()
Hmm Machan did u have JAVA installed in your PC ....then i suggest you to run this and see!!!!!
Actually this is a simple code for get two points as input and to output the line which goes across that two points !!!!!
Try and see !!!!


) a C++ program that draws lines on DOS Console
Crazy idea huh! it does draw correctly now but i thought of optimizing it a bit, I'll post it tomorrow
and hey give some screenshots(I dont know how to run java codes, just tried running the code lakmal gave for line equation but it gave some errors :S)I'm currently developing(nearly done) a C++ program that draws lines on DOS Console
Crazy idea huh! it does draw correctly now but i thought of optimizing it a bit, I'll post it tomorrow
Try to code it!and hey give some screenshots(I dont know how to run java codes, just tried running the code lakmal gave for line equation but it gave some errors :S)
Can you give a Screenshot ??I'm currently developing(nearly done) a C++ program that draws lines on DOS Console
Crazy idea huh! it does draw correctly now but i thought of optimizing it a bit, I'll post it tomorrow
Try to code it!and hey give some screenshots(I dont know how to run java codes, just tried running the code lakmal gave for line equation but it gave some errors :S)
i dnt knw C++ or java this is C
/*sum of the 1-n odd’s using for loop */
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1, tot=0,test;
printf(“enter the number \n”);
scanf(“%d”,&num);
for (i=1;i<=num;i++)
{
test=i%2;
if(test!=0)
{
tot+=i;
printf(“odd number is%d \n”,i);
}
}
printf(“TOT OF 1 to %d odd’s is %d \n”,num,tot);
getch();
}
Cmon !!!!Can any one help me to create a download manager using VB.net.I want options like download direct links Giving from a text.also need some codes for disconnect a dial up connection.If the link redirect to mirror it also can be download .Plz help.
මේ එකක් තාම හදනව!!Ko ape kattiya !!!!! hey guys dont let this thread down !!!!!!! Cmon with new algorithms !!!!
