Thanks a million Salem !
Type: Posts; User: amaelle
Thanks a million Salem !
Good day C Gurs
I have a tring file called "Swap.txt" its content is the following matrix
char mat[ROW][COLS]=
"**.*.*....*",
"..*.*...**.",
"*...*.*....",
".*.*.*.*.*.",
"..*.*...*.*"
Thanks a million man! you truly saved my life
May God bless your knowledge!
Good day C Gurs
I have a tring file called "Swap.txt" its content is the following matrix
char mat[ROW][COLS]=
"**.*.*....*",
"..*.*...**.",
"*...*.*....",
...
Thanks Algorithm
your method work perfectly fine, but its only inconvenience is that its only usable with small numbers of 0's , is there any other approach to look for a big number of occurences...
Thanks for your prompt answer
*First i meant that my first code is searching per row the occurence of my 0's sequence.
*yes it goes outside the bound of the array but still i couldn t come out...
Good day C Gurus
I want to Write a C program that:
a. Read a square matrix (5 rows by 5 columns) from the keyboard,
loading the values by rows, or by column, at will
b. Find the contiguous...
Thank you Matticus for your prompt reply and I could fix the problem following your remarks
sscanf(matrix[i],"%s %s %d %d",name[i],surname[i],&IDE[i][1],&mark[i][1]);
you said that IDE and...
Good day C Gurus
I m trying to insert the list of the name surnames ID and grades of 5 students and then exctrating their grades using sscanf my code is the folowing
#include <stdio.h>...
Good day C Gurus,
I want to write a program that acquires 2 strings, each containing the name of a product and its price separated by a space. Once this information is stored into appropriate...
Thanks a million Matticus!!
you saved me from a huge pitffal!!!
Good day C gurus!
Write a C program that asks for 2 integer numbers (a and b) and a character in the sameline. The character is then used to define the operation to perform between the numbers...
Thanks a million to both of you Salem and Anduril!!
Each time i come here I got valuable informations!!
Good day C gurus
I was trying to code the biggest commum divisor for two number program but was confronted to a problem
here is my code by the way
#include <stdio.h>
#include <stdlib.h>
Here is the code in which the counter starts 0;
Thanks to you all again, without you i couldn't have made such progress!!
#include <stdio.h>
#include <stdlib.h>
Great explanation and the code works just fine!!
My sincere thanks to you Laserlight as well as to Jim and to Algorithm!! You guys are the best!!!
First let me thank you both Jim and Algorithm, every time i'm learning so much things from your posts and yes you are right Algorithm i have still so much confusiong about C principles but please...
Greeting C gurus!!
I'm trying to write a counting frequency elements in array code but it's not working
#include <stdio.h>
#include <stdlib.h>
Thanks Algorith for your prompt and valuable reply (as usual);
my question is :(flength && fdigit && fcapital && fpunc) equivalent to (flag==1)&&(fdigit==1)&& ((fcapital==1))&& (fpunct==1))?
...
Good day C Gurus !!
I want to write a program that should satisfy the following criteria:
1.password should contain at least one capital letter
2. should have one digit from(o-9)
3.ength should...
Thank you Algorithm, i now got your point
my actual now code looks like :
float avgVect(int v[], int n,int *greater)
{
int i;int count=0;
int s=0;
float average;
Thanks hobbit for your quick reply
if i understood you well (please excuse my ignorance i'm still a newbie in C" there is no need for count, great should be enough
here is my new code
...
Greeting
I'm trying to write a single function that returns the average value and stores the count of the elements greater than the average value
into the parameter named greater, as defined in...
Thanks a million !!!
your answer is just wonderful!
thank you salem
you are right!! this is how the problem should be handled!