
11.02.2010, 00:08
|
|
Участник форума
Регистрация: 18.07.2009
Сообщений: 272
С нами:
8850336
Репутация:
330
|
|
Сообщение от KrabKN
Можеш написать на СИ!!!
Держи:
Код:
#include <stdio.h>
#include <string>
int kol(int n, int m);
void kol();
int main()
{
int i;
int g;
int r;
printf("The program finds the current number of positive numbers\n");
printf("Enter the number of: ");
scanf("%d,%d", &g, &r);
i=kol(g,r);
printf("Number of positive numbers entered:%d\n", i);
printf("The program will calculate the number of characters in the word\n");
kol();
return 0;
}
int kol(int n, int m)
{
for(; n<m; n++) {
if (n>=0) printf("%d ", n);
}
return n;
}
void kol()
{
char str[80];
printf("Enter word: ");
scanf("%64s", str);
printf("Number of characters in the word %d", strlen(str));
}
|
|
|