Previous Next
0 / 23
Module DEMO-32-108DEMO-C-32

Valid Email

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that performs a simple validation check on an email string: it must contain exactly one '@' and at least one '.' after the '@'.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

VALID/INVALID

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
integer11@compile.org
VALID
The string integer11@compile.org is a VALID email format.
Sample #2
Public sample
index61@vanillagov
INVALID
The string index61@vanillagov is a INVALID email format.
Sample #3
Public sample
switch11@date.net
VALID
The string switch11@date.net is a VALID email format.
Sample #4
Public sample
class75@record.ai
VALID
The string class75@record.ai is a VALID email format.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings