xxxxxxxxxx
//Write a program that determines the class of the ship depending on its class ID (identifier).
//Here are the criteria: The class ID serves as the input data and the ship class as the output information.
//Class ID: B, C, D, F. Ship Class: Battleship, Cruiser, Destroyer, Frigate.
#include<stdio.h>
main()
{
char cid;
printf("INPUTTED ANSWER MUST BE ALPHABETICAL LETTER");
printf("\nEnter the class ID of the ship: ");
scanf("%c",&cid);
if(cid=='b'||cid=='B')
printf("\nSC: BATTLESHIP\n");
else if(cid=='c'||cid=='C')
printf("\nSC: CRUISER\n");
else if(cid=='d'||cid=='D')
printf("\nSC: DESTROYER\n");
else if(cid=='f'||cid=='F')
printf("\nSC: FRIGATE\n");
else printf("\nUNKNOWN SHIP CLASS!\n");
}