Created
February 28, 2018 15:40
-
-
Save not7cd/7493167de91d23cbfa01457dc7e58269 to your computer and use it in GitHub Desktop.
Proceduralne Języki Programowania I
This file contains 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> | |
#include <stdlib.h> | |
int main() | |
{ | |
int a, b, c, d, sum; | |
float avr; | |
printf("Give first number: "); | |
scanf("%i", &a); | |
printf("Give second number: "); | |
scanf("%i", &b); | |
printf("Give third number: "); | |
scanf("%i", &c); | |
printf("Give fourth number: "); | |
scanf("%i", &d); | |
sum = a+b+c+d; | |
printf("Sum of your numbers: %i\n", sum); | |
avr = (float) sum / 4; | |
printf("Average of your number: %f\n", avr); | |
int ans = (2.f + 2.f) == (int) 4; | |
int ans2 = 2 + 2 == 4; | |
printf("%i vs %i", ans, ans2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment