/*2026년 5월 21일 목요일
작성목적:11주차 퀴즈 과제 제출*/
#include <stdio.h>
#include <string.h>
void myinfo()
{
printf("202606017 나경문\n");
}
int main() {
myinfo();
char email[30];
int haveat = 0; //변수명에 @가 못들어간다니
scanf("%s", email);
for (int i = 0; i<strlen(email); i++) {
if (email[i] == '@') {
haveat = 1;
break;
}
}
if (haveat == 1) {
printf("사용 가능한 이메일");
}//@ 포함시 맞다고 판정
else {
printf("이메일 형식이 아닙니다"); // @미포함시 틀리다고 판정
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: