A'right thanks to you all.!
Type: Posts; User: ariella
A'right thanks to you all.!
I didnt understand, can you write the code you meant instead of my line 17?
I have an assignment:
e.g
Valid word: yyxyyxzxz
Invalid word: xyxyxz
Here is the code I wrote:
True. Thanks.
Final code:
#include <iostream>
using namespace std;
const int SIZE=5;
void order (int arr[SIZE][SIZE])
{
Thanks alot!
That worked:
#include <stdio.h>
int single (int arr[], int size)
{
int count[512]={0}; //Looking for single value.
Here is my full new code:
#include <stdio.h>
int maxValue (int arr[], int size)
{
int max_value=arr[0];
Thanks alot!
Now what about a case I have a wide range of numbers?
Can I make a loop to find the highest number and then define count[max_value]={0};
and run it?
like this:
(purple for changed...
I changed it this way:
int single (int arr[], int size)
{
bool couple=false;
for (int i=0, k=0;i<size;i++, k++)
{
couple=false;
for (int j=1+k;j<size;j++)
corrected:
(line 46)
if (s[ind3] == 'i' && ind3==length-2 && s[ind3+1] == 'l' && ind3+1 ==length-1) return 1;
else return 0;
It has to end with 'il'.
Here I corrected it:
int isValid (char s[])
{
int length=strlen(s), ind1=0, ind2=0, ind3=0;
if ( (s[0]<'a') || (s[0]>'z') ) return 0;
2. forgot about s[0] thanks.
3. on line 50 Im checking I and L
4. lines 38-47: dot before il checked:
for (int k=ind2;k<length;k++)
{
if (s[k]=='.')
{
Hi, now I have to write a code which would determine whether
an Email address is valid or not.
In my exercise a valid address should look like this :
___@___.___.il (___ for any letters)
...
Okay toda :)
Saw you are from Rashlatz, Im from Jerusalem :)
I wrote a code which checks if there are any single numbers in an
array.
e.g.
In the next array there is a single number - "3"
4
1
Thanks guys, I improved my code :)
Oh I'm sorry, didnt know that.
I'm using C, why should I stop using cout?
Hi,
I have to write a code which would determine either a URL address
is correct or not.
Now, a valid address should look like: "www.something.something.uk".
It has to have 3 dots, 3 w-s in the...
Yup that was it.
Thank you very much! :)
I have to convert a matrix like in the following image:
12814
The code I wrote doesn't work:
#include <iostream>
using namespace std;