15,890,336 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by N Shiva (Top 30 by date)
N Shiva
26-Jun-13 3:25am
View
i didn't get u..
N Shiva
25-Jun-13 5:22am
View
give me link to download Turbo C software, which works on windows8.
N Shiva
25-Jun-13 5:09am
View
As my system is win8, I can't install any 'C' compiler. For this program I am using online compiler codepad.org
N Shiva
25-Jun-13 5:07am
View
No, a problem on some coding site...just trying 2 solve.
N Shiva
18-Oct-12 10:50am
View
I meant, I knew how to get product mathematically, If i wrote a function, How to return two no.s (imaginary & real) at a time ?
N Shiva
18-Oct-12 8:56am
View
Deleted
a simple way is wherever you want you can use this formula right...
(x + yi)(u + vi) = (xu – yv) + (xv + yu)i.
N Shiva
18-Oct-12 8:34am
View
Deleted
check this one aswell... somebody said some error in the above solution..
above code is incorrect. removind + and i from the scanf the code will work fine.
New and simple version for the above problem is
#include
int main()
{
int a,b,c,d,e,f;
printf("\nEnter the first complex number ");
scanf("%d %d",&a,&b);
printf("\nFirst number is ");
printf("%d + %di",a,b);
printf("\nEnter the first complex number ");
scanf("%d %d",&c,&d);
printf("\nSecond number is ");
printf("%d + %di",c,d);
e = a*c - b*d;
f = a*d + b*c;
printf("\nAfter multiplication ");
printf("%d+%di",e,f);
return 0;
}
N Shiva
18-Oct-12 8:27am
View
ok...
N Shiva
17-Oct-12 12:11pm
View
ok..thnx.. I will create a structure and i will write functions to add complex no.s (2 real numbers and 2 imaginary no.s) But how to get product ?
N Shiva
17-Oct-12 11:55am
View
Assume if i have defined a structure named complex, which has two fields i mean 2 floats one is imaginary and another is real.... How addition & multiplication of these no.s will be simple ?
N Shiva
17-Oct-12 11:30am
View
Is there any other way in 'C', except what I mentioned above.
N Shiva
14-Oct-12 11:42am
View
See once.. I edited the question...
N Shiva
11-Oct-12 1:50am
View
Thnk you.. but array c is also float array.
N Shiva
10-Oct-12 6:36am
View
Thnx. I got it.
1. why these are wrong?
float a[r1][c1];
float b[r2][c2];
You said "These statements are evil wrong (at compile time r1, c1, .. values are indefinite)! "
2. I replaced if ( product(a,b,c) ) return -1; ...with... product(a,b,c). is there any mistake. i am getting correct result.
3. I donno why you changed definition of product function from float to integer.
N Shiva
10-Oct-12 6:20am
View
The code you have given is ok. But
1. if ( product(a,b,c) ) return -1;
this means exactly?
2. How can I use this product function when I wanted to calculate 'Q' which is equal to x*y*z.
N Shiva
10-Oct-12 5:21am
View
I defined functions like ... float product(float a[20][20],float b[20][20],float c[20][20])...
and called this function in main as product(a,b,c), (I declared array-'C' in main function)... then execution is as follows:
Enter no.of rows of first matrix: 2
Enter no.of columns of first matrix: 2
Enter no.of rows of second matrix: 2
Enter no.of columns of second matrix: 2
Enter the elements of first matrix: 1 2 3 4
Enter the elements of second matrix: 0 3 2 1
4.000000 5.000000
0.000000 -1.931809
But i shoud get
4 5
8 13
N Shiva
10-Oct-12 4:13am
View
I tried this, i mean product(a,b,c)..and all.....but i am not getting any error, but iam getting wrong ans. I donno why?
N Shiva
9-Oct-12 12:44pm
View
That was code in C language. May I knw what is wrong in it.
N Shiva
9-Oct-12 12:39pm
View
My sole intention to write this function is, I use it in b/w my program related to Graph theory. where I may use product(product(x,y),z) to get x*y*z.
N Shiva
9-Oct-12 12:20pm
View
Deleted
My sole intention to write this function is, I use it in b/w my program related to Graph theory.
where I may use product(product(x,y),z) to get x*y*z.
N Shiva
9-Oct-12 12:17pm
View
When I declared array-C in main function and I passed it to product function{along with a & b }, I didn't get any error, but Iam getting wrong ans.
N Shiva
9-Oct-12 12:13pm
View
Then how can I print this when I want to?
N Shiva
9-Oct-12 12:06pm
View
Sorry, Iam not getting u.
N Shiva
9-Oct-12 11:47am
View
How can I catch the result in that function. I mean c[i][j].
I just want to store that in array c.
N Shiva
9-Oct-12 11:35am
View
Iam using array-c in main() even though it is not declared in main(). But even If I declare above main also Iam getting this error.
matr.c:5: error: variably modified ‘c’ at file scope
matr.c:5: error: variably modified ‘c’ at file scope
N Shiva
9-Oct-12 1:06am
View
ok. Thnkyou.
N Shiva
8-Oct-12 12:15pm
View
THNX. I got it... I have to use cc -lm while executing...
N Shiva
8-Oct-12 12:10pm
View
Deleted
yes...iam trying. but didn't getting. Iam getting this error nw.
/tmp/ccwrObJa.o: In function `cofact':
nshiva.c:(.text+0x431): undefined reference to `pow'
collect2: ld returned 1 exit status
N Shiva
8-Oct-12 11:55am
View
Sorry. I am unable to access that site from my campus.
Could you please tell me, what is the mistake.
N Shiva
8-Oct-12 11:46am
View
Thankyou.... Now Iam getting this error....
/tmp/ccwrObJa.o: In function `cofact':
nshiva.c:(.text+0x431): undefined reference to `pow'
collect2: ld returned 1 exit status
Show More