Skip to content

Instantly share code, notes, and snippets.

@darkodemic
Created June 4, 2015 10:52
Show Gist options
  • Save darkodemic/1f1202dbb25a0fc63de5 to your computer and use it in GitHub Desktop.
Save darkodemic/1f1202dbb25a0fc63de5 to your computer and use it in GitHub Desktop.
ternarni-pokazivaci kao tipovi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//preprocessor
int main(){
typedef double *pointer;
double a,b;
pointer pa = &a, pb = &b, pc;
puts("Unesite a");
scanf("%lf",pa);
puts("Unesite b");
scanf("%lf",pb);
pc = (*pa < *pb) ? pa : pb;
printf("%g",*pc);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment