Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void first_func() {
- float num1, num2;
- printf("Enter two numbers\nFirst: "); scanf("%f", &num1);
- printf("Second: "); scanf("%f", &num2);
- if (num1 == num2)
- {
- printf("They are equal: %f = %f", num1, num2);
- }
- else if (num1 > num2)
- {
- printf("They are not equal, %f > %f", num1, num2);
- }
- else
- {
- printf("They are not equal, %f < %f", num1, num2);
- }
- }
- int main(void)
- {
- int age;
- first_func();
- printf("\n\nEnter your age: "); scanf("%d", &age);
- if (age < 18)
- {
- printf("Please leave this place! You're too young.");
- }
- else if ((age >= 18) && (age < 60))
- {
- printf("Enjoy the site!");
- }
- else
- {
- printf("You're much too old!");
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement