Starting Alphabets a, b and c
Starting Alphabets a, b and c
Problem Statement:
The program must accept a string S with space as the input. The program must print the first part of the string which contains only the alphabets a, b and c as the output.
Boundary Condition(S):
1 <= N <=100
Input Format:
The first line contains S.
Output Format:
The first line contains the string value containing the alphabets a, b and c.
Example Input/Output 1:
Input:
aabacabeerabt
Output:
aabacab
Example Input/Output 2:
Input:
bcaacvrtabacr
Output:
bcaac
Note: Max Execution Time Limit: 4000 millisecs
Solution:
Programming Language: C Language
#include <stdio.h> #include <stdlib.h> int main() { char a[101];scanf("%[abc]",a); printf("%s",a); }
(Note: Incase the code Pass for an output kindly comment us with your feedback to help us improvise.)
Comments