Yes this is for my homework.
I am not lazy getting other people to do it for me i am just stuck.
This is the code i have. It sux and has too many errors to even list the errors on my compiler.
I am trying to create two functions to define the x,y and z co-ordinates of a line at its two ends, and store them in a matrix.
Very boring and difficult as I'm new to ++ but my talents lie elsewhere.
Someone who is good with ++ would probably be able to sort this code out in a second.
So someone please help me if anyone feels like it.
Code:#include <stdio.h> #include <stdlib.h> int main() { double line[2][3]; double x,y; int menu_option; printf("Please choose from the menu\n\n"); printf("1.\t\tTranslate the line\n"); printf("2.\t\tScale the line\n"); printf("3.\t\tRotate the line\n"); printf("4.\t\tChange position of L0 (Where P=0)\n"); printf("5.\t\tChange position of L1 (Where P=1)\n"); printf("6.\t\tEvaluate a point on the line\n"); printf("7.\t\tExit the program\n\n"); printf("Enter your choice here\n\n\n"); scanf("%lf", &menu_option); printf("\n\n\n"); } //Function defining 1st point of array { void enteringp1(int [0][0], int [0][1], int [0][2]); printf("Please enter the set of co-ordinates for the first point, P1, separated by spaces.\n\n"); scanf("%lf %lf %lf", &[0][0] &[0][1] &[0][2]); printf("\n\nThe co-ordinates for the first point, P1 are\t\t %lf, %lf, %lf\n\n" [0][0] [0][1] [0][2]); } //Function defining 2nd of the array { void enteringp2(int [1][0], int[1][1], int [1][2]); printf("Please enter the set of co-ordinates for the second point, P2, seperated by spaces.\n\n"); scanf("%lf %lf %lf", &[1][0] &[1][1] &[1][2]); printf("\n\nThe co-ordinates for the second point, P2 are\t\t %lf, %lf, &lf\n\n" [1][0] [1][1] [1][2]); }



LinkBack URL
About LinkBacks



There is no point in making a function if you aren't gonna use them.