Aircraft Classifier (IF Condition)
This C program classifies an aircraft based on its speed and length. It prompts the user to input the aircraft's speed and length, and then determines if it's a military or civilian aircraft, or if it's an unknown type, based on specified criteria.#include <stdio.h> int main() { int speed; int length; printf("Please enter speed: "); scanf("%d", &speed); printf("Please enter length: "); scanf("%d", &length); if (speed > 1100) { if (length < 52) { printf("Military"); } else { printf("Civilian"); } } else { printf("Unknown Aircraft"); } return 0; }
Leave a Comment