chitra4sat
Posts
-
Mother's Day-THE ADJECTIVE ANAGRAMS QUIZ -
Touring South AfricaHey rama there is a temple Named Mayan in South Africa.
-
writing an avi file -
No overload for method take "0" argumentsHi, Thanks for ur reply. But here,i am giving the values of Matrix A and Matrix B . I have used it as int[,] matrix A={{1,2},{2,3}}; and int[,]MatrixB={{2,3}.{3,4}}; which are the values i am sending it in the program itself . and i m calling it in the main program as mymatrix.AddMatrix(); but i got doubt there only how to pass the values becoz the values are all mentioned above. i need that mymatrix.AddMatrix(" how the values to be put it here "); here if i open that method bracket it is asking the value of (int[,]matrix A,int[,]matrix B) I am getting the problem only in passing the value only . so please help me by code in passing the value of this line . waiting for ur reply ASAP. Regards, Chitra.
-
No overload for method take "0" argumentshere is my code for your reference: in the main class Here i m giving the values for the matrix A & B int[,] MatrixA ={ { 1, 2 }, { 2, 3 } }; int[,] MatrixB ={ { 3, 4 }, { 4, 5 } }; public int[,] AddMatrix(int[,] MatrixA, int[,] MatrixB) { int numberOfRows = MatrixA.Length / 2; int numberOfCols = numberOfRows; int[,] MatrixC = new int[numberOfRows, numberOfCols]; for (int i = 0; i <=numberOfRows; i++) { for (int j = 0; j <=numberOfCols; j++) { MatrixC[i, j] = MatrixA[i, j] + MatrixB[i, j]; } } return MatrixC; } And i m calling this AddMatrix Method in the main program as mymatrix.AddMatrix(); in that how sould i have to pass the value let me know it ASAP. regards, Chitra.
-
No overload for method take "0" argumentsHi All, I m new in Programming with C#. I have created a method by means of passing the values using the two dimensional array of type int[,]. ie., i am passing two matrix A and Matrix B and calculating the sum and sub for the two matrix A and B. and i m storing it in the Matrix C. And i am calling this method in the main program everything works fine but it shows the error as No overload for method 'AddMatrix' takes '0' arguments and the same for the 'SubMatrix' also. I want to know how to pass the values in the main program. with regards, Chitra
-
Matrix AdditionThanks for your help . regards, chitra.
-
Matrix AdditionHi Keshav, Thanks for your reply. And i tried it like this. here is the code for ur ref I am running it in the console application Matrix.cs file
namespace MatrixAddition { public class Matrix { public double[,] Data; public Matrix(double[,] data) { Data = data; } public static Matrix operator +(Matrix M1, Matrix M2) { int r1 = M1.Data.GetLength(0); int c1 = M1.Data.GetLength(1); int r2 = M2.Data.GetLength(0); int c2 = M2.Data.GetLength(1); double[,] res = new double[r1, c1]; for (int i = 0; i < r1; i++) { for (int j = 0; j < c1; j++) { res[i, j] = M1.Data[i, j] + M2.Data[i, j]; } } return new Matrix(res); } } }
them i am trying to call it in the main fumction but i could not able to get it. pls correct my code in the matrix.cs page and tell me how to call it in the main program. waiting for reply regards, chitra. -
Matrix Additionhey i tried google also but i could not able to get the correct thing which i m needed. regatds, Chitra.
-
Matrix AdditionHi All, I am new to programming with C#. I have been asked to calulate the sum of the 2x2 matrix and it should display the output on the third matrix. I tried a lot but i could not able to get it. if there is any link also pls send me. pls help me. regards, Chitra
-
Get the Largest among the four numbers.Hi all, i am new to programming in C#. i dont know to code it to get the output ie., the largest among the four numbers and the user will give the input as numbers. and the munbers are int type inta,b,c,d; i need the code for largest among the four numbers of int a,b,c,d. pleae help me in sending code. regards, chitra.
-
Re: Calculate and Display Prime NumbersHi Thanks, I have created it as you said the PrimeNumClass as you have mentioned . but what are all the things have to be inside that class and let me know it by code. becoz i have the output in the main program and all the funcctions are carried out there. but i have been asked that in the main program there should not be anything but we have to create the object and w ehave to call that method to display the output of the prime number. so please help me what to do ?
-
Re: Calculate and Display Prime NumbersThanks Guyz, I have tried it as this but the problem is i have to put all the methods in a another class progam such as PrimeNumClass.cs and i have to call that in the main program to display the output. here is my code:
namespace PrimeNumber { class Program { static void Main(string[] args) { // declare variables int n = 2; int totalPrimeNumbers = 0; int x; double sumOfPrimes = 0; // while loop when n <= 100 while (n <= 100) { bool isPrime = true; // test if n is prime for (x = 2; x < n; x++) { if ((n % x) == 0) { isPrime = false; break; } } if (isPrime == true) { Console.WriteLine(n + " is a prime Number."); sumOfPrimes = sumOfPrimes + n; totalPrimeNumbers++; } n++; } } } }
Here everything is in Main Program itself. But i want it all in a seperate class Nmaed PrimeNumClass.cs and i have to call that class in the main Class to display the output. please help me. itz very urgnet. regards, Chitra -
Re: Calculate and Display Prime NumbersHi All, I am an Student and learning C#. my work is to write a class for calculating the number which is prime number and w ehave to call that method in a main program to display the output. And i have to get the number from the user end using the Console.ReadLine(). No array declaration only using the for loop or the if else condition loop. please help me in coding for calculating the Prime Number. Awaiting your response ASAP. Regards, Chitra
-
Class for looping every Character of stringHi all, i am new to this ASp.net 2.0(C#) programming. I need a class which loops through every Character of a given String and basket them as two seperate string variable by the following. One basket will collect only input string start from a to g and the other collect h to z character. for eg: microsoft is the input string. in that first basket it will have "cf" and in the second basket it will have "mirosot". With Regards, Chitra
-
Error in Creating StructsHey All, i am new to programming and they asked me to create a struct for calculating Area with the length and width. I have coded but it shows error and please help me to correct the error and i will paste my code here.
Struct Area { Public int length; Public int width; Public int area; Public Area(int _length, int _width) { this.length=_length; this.width=_width; this.area=(_length* _width); } Public int GetArea() { return area; } static void main(int[] args) { Area area=new Area(); Console.Writeline(area.GetArea()); } }
Chitra -
User Control RequirementHi All, I have a requirement for a user control. Below is the specification of that. This control should be able to read a quote from a database table (sqlserver2005) and it should display the Quote on daily basis. Randomly display a quote but once display on a particular date should be repeated until all the quotes are displayed. Before changing to a different quote display, the old quote should be stamped with the date it was displayed. Table name : DailyQuotes Fields:- QuoteId : integer Quote : nvarchar(Max) LastdisplayDate : datetime. I am developing usiing C# and Asp.net2.0 its very urgent kindly help me. Regards, chitra