Results 1 to 9 of 9
Hybrid View
-
29th April 2011 15:53 #1
" "
13 .Code:#include <stdio.h> #define IN 1 #define OUT 0 main() { int c, nl, nw, nc, state; state=OUT; nl=nw=nc=0; while ((c=getchar()) !=EOF){ ++nc; if (c == ' ' || c == '\n' || c = '\t') state = OUT; else if (state==OUT) { state = IN; } } printf("%d %d %d\n", nl, nw, nc); }
13 C:\Dev-Cpp\Untitled1.c invalid lvalue in assignment
?" fear of weapons is a sign of retarded sexual and emotional maturity" S. Freud
-
29th April 2011 16:00 #2
-
29th April 2011 16:17 #3
.

, , , ?" fear of weapons is a sign of retarded sexual and emotional maturity" S. Freud
-
29th April 2011 16:22 #4Registered User
Join Date: Aug:2006
Location:
Posts: 4,052
Ctrl+Z ?
-
29th April 2011 16:50 #5
. .
" fear of weapons is a sign of retarded sexual and emotional maturity" S. Freud
-
29th April 2011 17:31 #6
-
29th April 2011 17:28 #7Registered User
Join Date: Jan:2005
Location: BG
Posts: 4,903
, , e ?
getchar(); , .
.. . nl nw ++ ???
.
, , ... ...
-
29th April 2011 18:02 #8
-
29th April 2011 17:43 #9Registered User
Join Date: Jan:2005
Location: BG
Posts: 4,903
, ++ , :
#include <stdio.h>
#define IN 1
#define OUT 0
main()
{
int c, nl, nw, nc, state;
state=OUT;
nl=nw=nc=0;
while ((c=getchar())!=EOF)
{
++nc;
if (c == ' ' || c == '\n' || c == '\t')
{state = OUT;
++nw;
}
else if (state==OUT)
{state = IN;
++nl;
}
}
printf("%d %d %d\n", nl, nw, nc);
getchar();
}
- . + , . ...
...
.. ? ... , ... , ..., , ... ...




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in