#include <stdio.h>
int main()
{
int i;
int a[1000];
int x;
int ret;
int y;
int ret2;
Type: Posts; User: Kevin Nguyen
#include <stdio.h>
int main()
{
int i;
int a[1000];
int x;
int ret;
int y;
int ret2;
this was a question from my first exam and it says
write a c function which takes a string(as a character array, null terminated) and reverses it. it doesn't print the reversed string -- it...
what does this mean?
if(somenumber == 0)
{
blah blah
}
if(!(somenumber%2))
{
so im trying to check the row if there's any repeats in my hard coded function in my 3d array so for example, if a person wants to check the first sudoku set, they press 1 to check it, however my...
1 2 3 4 5 6 7 8 9
2 3 4 5 6 7 8 9 1
3 4 5 6 7 8 9 1 2
4 5 6 7 8 9 1 2 3
5 6 7 8 9 1 2 3 4
6 7 8 9 1 2 3 4 5
7 8 9 1 2 3 4 5 6
8 9 1 2 3 4 5 6 7
9 1 2 3 4 5 6 7 8
I have my sudoku array of 9x9 in character, is there a way to convert the char sudoku array into int sudoku array assuming all the char is between '1'-'9'?
when im opening the file, do i need to extract from the .txt file and put it into an array to check if the input is valid? Or is there a simpler way?
So my program is to check if a certain 9x9 sudoku grid is valid. i have to get the input through command argument. so for example.
./a.out sudoku.txt
So we have make my c program to use FILE...
heres what i have so far if i type in "3,4,5,4,4,5,6,6,e(to finish inputting numbers)" the distinct values should be 4, but i got 5. so im still off by 1.
#include <stdio.h>
...
Here's what i have, when i get the total distinct values, it's now 19.... am i missing something that i don't see? i got my array sorted.
//---------function to find the distinct values-------
...
would i need to make a 2nd array then?
So this code I'm trying to calculate the number of distinct values entered into an array. If i enter the followings
"3,4,5,6,7,7,6,e (anything that's not a number)"
i get a total of 7 but in...
Hello I need help with my code. Im suppose to use a "do statement"
the user types in 1 to do an addition homework. it'll display an addition problem.
If they get it right the first time, the...
so what do i exactly do then? sorry this is really bothering me.
hello everyone so im trying to make my program read a bunch of numbers in an array to find its maximum and minimum. the program will ask the user to enter in as much number as possible until they...