Last active
August 29, 2015 14:14
-
-
Save Sadin/50147cc3b7ba0d4723c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
float numbers_geeks_love[3]; | |
numbers_geeks_love[0] = 3.1415; | |
numbers_geeks_love[1] = 1.6180; | |
numbers_geeks_love[2] = 1.4142; | |
printf("PI %f\n", numbers_geeks_love[0]); | |
printf("golden ratio %f\n", numbers_geeks_love[1]); | |
printf("square root of %f\n", numbers_geeks_love[2]); | |
int primes[] = {2, 3, 5, 7}; | |
printf("the first 4 prime numbers %d %d %d %d\n", primes[0], primes[1], primes[2], primes[3]); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
float numbers_geeks_love[] = { 3.1415, 1.6180, 1.4142 }; | |
printf("PI %f\n", numbers_geeks_love[0]); | |
printf("golden ratio %f\n", numbers_geeks_love[1]); | |
printf("square root of %f\n", numbers_geeks_love[2]); | |
int primes[] = {2, 3, 5, 7}; | |
printf("the first 4 prime numbers %d %d %d %d\n", primes[0], primes[1], primes[2], primes[3]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PI 3.141500
golden ratio 1.618000
square root of 1.414200
the first 4 prime numbers 2 3 5 7
Program ended with exit code: 0