Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- struct poz{
- int x;
- int y;
- };
- void fun(struct poz tab[],int r){
- int i,a;
- printf("wspolrzedne z I i v cwiartki:");
- for(i=0;i<=r;i++){
- if(tab[i].x>0 && tab[i].y>0){
- a++;
- printf(" %d:%d ",tab[i].x,tab[i].y);
- }
- if(tab[i].x<0 && tab[i].y<0){
- a++;
- printf(" %d:%d ",tab[i].x,tab[i].y);
- }
- }
- };
- int main(){
- struct poz tab[5]={{1,2},{4,-5},{-4,-2},{-2,3},{-4,-25}};
- int r=sizeof tab/sizeof tab[0];
- fun(&tab,r);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement