How to write a function should print the cartesian coordinates of the struct argument in C Programming Language ?
- /*This function should print the cartesian coordinates of the struct argument*/
- void printCartesian(struct cartesian_t n){
- printf("Result in cartesian:");
- printf("%.3f ", n.x);
- if ((n.y) >= 0){
- printf("+");
- }
- else{}
- printf("%.3f \n", n.y);
- }