Arulmozhivarman is working in ship. He is responsible for classifying the ship into different classes based on the letterclass ID of the ship.
#include <stdio.h> int main() {char ID; scanf("%c",&ID); if(ID=='B'||ID=='b') {printf("BattleShip");} else if(ID=='C'||ID=='c') {printf("Cruiser");} else if(ID=='D'||ID=='d') {printf("Destroyer");} else {printf("Frigate");} return 0;}
0 Comments
if you have any doubt, plz let me know