// cbai17.cpp : Defines the entry point for the console application.
// code Dung NV
#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
int dodaixau(char s[])
{
int i=0;
while (s[i]!='\0') i++;
return i;
}
int _tmain(int argc, _TCHAR* argv[])
{
char s[100];
printf("Nhap vao mot xau ki tu: ");
gets(s);
printf("Do dai xau vua nhap la: %d",dodaixau(s));
getch();
return 0;
}
No comments:
Post a Comment