Ad Code

NEW POST

6/recent/ticker-posts

SRM ELABS PROBLEMS :Arulmozhivarman is working in ship. He is responsible for classifying the ship into different classes based on the letterclass ID of the ship.

 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;}



Post a Comment

0 Comments