/* ============== Program Description ============= */ /* program name : inchar.cpp */ /* input a char out put a char */ /* ================================================== */ #include <iostream.h> #include <conio.h> main() { char str[51]; int i=0,t=0; clrscr(); cout<<"enter 50 long char & for finish inter '.' "; cin.get (str,50,'.'); while (str[i]!='.') { if (str[i]==' ') t++; i++; } //end while cout<<"your entered sentence has "<<++t<<" word"; getch(); return 0; } //end main</body> </html>
تعداد حروف کوچک یک رشته کاراکتری را پیدا کرده و در خروجی چاپ کند. < include<iostream.h# <include<iostream.h# ()main } ; [char s[30 ; int cnt=0 , i ; (gets (s (++For(i=0 ; s[i]!=’\0’ ; i ('If (s[i]>’a’&& s[i]<=’z ; ++ cnt ; cout<< cnt {
تعداد حروف کوچک یک رشته کاراکتری را پیدا کرده و در خروجی چاپ کند.
< include<iostream.h#
<include<iostream.h#
()main
}
; [char s[30
; int cnt=0 , i
; (gets (s
(++For(i=0 ; s[i]!=’\0’ ; i
('If (s[i]>’a’&& s[i]<=’z
; ++ cnt
; cout<< cnt
{