2023-11-29, 09:42 PM
(This post was last modified: 2023-11-29, 10:04 PM by BotLevel.Bobu.)
Hi ! I need your help. I want to find the number in a random text.
For example:
For example:
Code:
#include <open.mp>
main()
{
new randomText.1[50] = " Hi, my name is John and I am 29 years old.";
new randomText.2[50] = " Hey there, I choose the number 17.");
new randomText.3[50] = " I want to be the number 1.");
new Age;
new LottoNr;
new Number;
FindTheNumber(randomText.1, Age);
printf(" Number found: %d", Age);
FindTheNumber(randomText.2, LottoNr);
printf(" Number found: %d", LottoNr);
FindTheNumber(randomText.3, Number);
printf(" Number found: %d", Number);
}