Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
structt
//Title of this code //gcc 4.8.2 #include <stdio.h> struct point{int x; int y;}; struct point makepoint(int x,int y) { struct point t; t.x=x; t.y=y; //printf("%d",t.x); return t; } struct rect { struct point pt1; struct point pt2; }; struct rect screen; int ptinrect(struct point p, struct rect r) { return p.x >= r.pt1.x && p.x < r.pt2.x && p.y >= r.pt1.y && p.y < r.pt2.y; } int main(void) { struct point t;t=makepoint(2,3); screen.pt1=makepoint(1,2); screen.pt2=makepoint(3,4); struct point middle=makepoint ((screen.pt1.x+screen.pt1.y)/2 ,(screen.pt2.x+screen.pt2.y)/2); // printf("%d,%d\n",middle.x,middle.y); //ptinrect(t, screen); printf("%d\n", ptinrect(t, screen)); struct point *pp; pp=&t; (*pp).x=1; return 0; }
run
|
edit
|
history
|
help
0
Lab 9 v0.5
Q1.c
MailingList
Factorial_LOOP
String copy
co_4
Run code before/after main in C (GCC)
Présentation
150109_RecursividadFactorial
PREGUNTA 2, GUÍA 4, MÓDULO 3 FINALIZADA