or can anyone suggest me a website from where i can download c code(without my lecturer getting any doubt ;-))
Mini projects on computer graphics using c?
http://www.codeproject.com/
http://www.freeprogrammingresources.com/...
http://www.thefreecountry.com/sourcecode...
http://www.programmersheaven.com/
http://msdn.microsoft.com/vstudio/expres...
Reply:how can i type mini project here give ur email id
Reply:Go for
www.codearchive.com
may other are already been provided
or go for some blogs ....
Thank you.
Mandar Gurav
Wlachand College Of Engineering, Sangli,
Maharashtra, India.
Monday, May 24, 2010
How to calculate the inverse of nxn matrix using C/C++?
Does anyone have a C or C++ code that can calculate the inverse of nxn matrix?
How to calculate the inverse of nxn matrix using C/C++?
you can make the calculation with the kramer's rule
Given a 3x3 matrix M:
| A B C |
| |
M = | D E F |
| |
| G H I |
Then the determinant is calculated as follows:
n
---
\ i
det M = / M * submat M * -1
--- 0,i 0,i
i=1
where
submat M defines the matrix composed of all rows and columns of M
ij
excluding row i and column j. submat may be called recursively.
ij
| A B C |
M = | D E F | becomes submat = | E F |
| G H I | 11 | H I |
If the determinant is non-zero then the inverse of the matrix exists.
In this case, the value of each matrix element is defined by:
-1 1 i+j
M = ----- * det submat M * -1
j,i det M i,j
How to calculate the inverse of nxn matrix using C/C++?
you can make the calculation with the kramer's rule
Given a 3x3 matrix M:
| A B C |
| |
M = | D E F |
| |
| G H I |
Then the determinant is calculated as follows:
n
---
\ i
det M = / M * submat M * -1
--- 0,i 0,i
i=1
where
submat M defines the matrix composed of all rows and columns of M
ij
excluding row i and column j. submat may be called recursively.
ij
| A B C |
M = | D E F | becomes submat = | E F |
| G H I | 11 | H I |
If the determinant is non-zero then the inverse of the matrix exists.
In this case, the value of each matrix element is defined by:
-1 1 i+j
M = ----- * det submat M * -1
j,i det M i,j
Please help me in for loop using C++?
for loop using TC?
please help me to solve this problem.. i cant help it.. i dont know how to do it.. please....
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
%26gt;%26gt; that will be the output using for loop
thanks.. please do help me guys
Please help me in for loop using C++?
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
void main()
{
for(int i=5;i%26gt;=1;i--)
{
for(j=1;j%26lt;=i;j++)
cout%26lt;%26lt;i;
cout%26lt;%26lt;"\n";
getch()
}
}
Reply:using the following loop
for(i=1;1%26lt;=5;i++)
{
for(j=i;j%26lt;=5lj++)
{
cout%26lt;%26lt;setw(3)%26lt;%26lt;j;
}
cout%26lt;%26lt;endl;
}
Reply:try starting with a for loop to keep count of where you are up to, so it needs to start at 1 and have a max of 5, then it will increment each time ... you know the structure of a for loop -
for (i = 1; i %26lt;= 5; i++) { ... }
then inside that for loop you'll need an output function to print the number you're up to, so, i to your max of 5. this output for loop will end when it reaches 5. so put this for loop inside the curly brackets of your outer for loop.
then you'll go back to your outer for loop which will go to the next number, then your inner for loop will go from there and so on ...
always break your problem down and address one step at a time :)
please help me to solve this problem.. i cant help it.. i dont know how to do it.. please....
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
%26gt;%26gt; that will be the output using for loop
thanks.. please do help me guys
Please help me in for loop using C++?
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
void main()
{
for(int i=5;i%26gt;=1;i--)
{
for(j=1;j%26lt;=i;j++)
cout%26lt;%26lt;i;
cout%26lt;%26lt;"\n";
getch()
}
}
Reply:using the following loop
for(i=1;1%26lt;=5;i++)
{
for(j=i;j%26lt;=5lj++)
{
cout%26lt;%26lt;setw(3)%26lt;%26lt;j;
}
cout%26lt;%26lt;endl;
}
Reply:try starting with a for loop to keep count of where you are up to, so it needs to start at 1 and have a max of 5, then it will increment each time ... you know the structure of a for loop -
for (i = 1; i %26lt;= 5; i++) { ... }
then inside that for loop you'll need an output function to print the number you're up to, so, i to your max of 5. this output for loop will end when it reaches 5. so put this for loop inside the curly brackets of your outer for loop.
then you'll go back to your outer for loop which will go to the next number, then your inner for loop will go from there and so on ...
always break your problem down and address one step at a time :)
How do i move files using C program?
i wanna know what should be the logic to write a c program which moves a file from one directory to other location in windows?
How do i move files using C program?
You should use the 'rename' function (not MoveFile, which is not C Runtime but a Windows function). See the link below.
Reply:The logic is:
Move File "F" to location "L".
The syntax depends on how you wanna do it. Do you always want to overwrite any files that might be there already, do you want the new file to append to the old one, do you need to keep old versions of the files, etc.
Reply:MoveFile
The MoveFile function renames an existing file or a directory (including all its children).
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
sound cards
How do i move files using C program?
You should use the 'rename' function (not MoveFile, which is not C Runtime but a Windows function). See the link below.
Reply:The logic is:
Move File "F" to location "L".
The syntax depends on how you wanna do it. Do you always want to overwrite any files that might be there already, do you want the new file to append to the old one, do you need to keep old versions of the files, etc.
Reply:MoveFile
The MoveFile function renames an existing file or a directory (including all its children).
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
sound cards
Is it possible to program using C++ on a Mac running leopard?
Write computer programs and applications with C++ as the PL.
Is it possible to program using C++ on a Mac running leopard?
Yep...C++ was designed to be portable.
I believe eclipse (eclispe.org) will run fine on a mac, and a few google searches should lead you where you want.
Reply:Yes, Leopard is based off of FreeBSD and the Mach kernel. Like any Unix system, you can usually find GCC on the system.
Is it possible to program using C++ on a Mac running leopard?
Yep...C++ was designed to be portable.
I believe eclipse (eclispe.org) will run fine on a mac, and a few google searches should lead you where you want.
Reply:Yes, Leopard is based off of FreeBSD and the Mach kernel. Like any Unix system, you can usually find GCC on the system.
To find factorial of number using c++?
i want a program which finds factorial upto first 1000 numbers in c++
To find factorial of number using c++?
Try... this cool website:
http://www.pixel2life.com
bye......................................
Reply:main()
{
int
for(i=1;i%26lt;=1000;i++)
{
fact=rec(i) ;
cout %26lt;%26lt; fact ;
}
getch() ;
}
rec( int x)
{
int f ;
if( x==1)
return(1) ;
else
{
f=x*rec(x-1) ;
return(f) ;
}
}
Understood the logic of the above program ?
To find factorial of number using c++?
Try... this cool website:
http://www.pixel2life.com
bye......................................
Reply:main()
{
int
for(i=1;i%26lt;=1000;i++)
{
fact=rec(i) ;
cout %26lt;%26lt; fact ;
}
getch() ;
}
rec( int x)
{
int f ;
if( x==1)
return(1) ;
else
{
f=x*rec(x-1) ;
return(f) ;
}
}
Understood the logic of the above program ?
How to start/restart pc using c language?
the question is write in c language
How to start/restart pc using c language?
The answer is to read the shell script for shutdown in a text editor and go from there.
How to start/restart pc using c language?
The answer is to read the shell script for shutdown in a text editor and go from there.
Subscribe to:
Posts (Atom)