No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
13 Posted Topics
L1: original list L2: Sorted list 1. Copy all value of L1 into L2. 2. Sort L2.
My way is most simple. Using array. When you input number. Store it in to the array. And then find the max.
[B]CMatrix.cs[/B] [CODE] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Matrix { class CMatrix { private int[,] a; private int r, c; public void Input() { Console.Write("Input number of row: "); this.r = Convert.ToInt32(Console.ReadLine()); Console.Write("Input number of column: "); this.c = Convert.ToInt32(Console.ReadLine()); this.a = new int[r, c]; for (int …
Check out of this. Hope this help. [CODE] #include "stdafx.h" int CheckLeapYear(int year){ // Check out leap year if (year % 4 == 0 && year % 100 != 0) return 1; if (year % 400 == 0) return 1; return 0; } int DayMaxOfMonth(int day, int month, int year) …
Hello everybody !!! I have a problem that. When I back up using "Microsoft.SqlServer.Management.Smo". It works perfect on my PC. But when I bring it to another PC. It doesn't work at all. Please give me some help!!! The file attach below [ATTACH]23303[/ATTACH] Thanks for your helping !!!
INPUT.txt [CODE] 6 p q r s k m 6 ~p|q ~q|r ~p|~r|s ~r|k ~k|m r m [/CODE] right OUTPUT.txt [CODE] ~p|q,~q|r,~p|~r|s,~r|k,~k|m,r,~m p: Resolve unsuccessfully q: ~p|~r|s,~r|k,~k|m,r,~m,~p|r r: ~k|m,~m,~p|s,k,~p|k s: Resolve unsuccessfully k: ~m,~p|s,m,~p|m m: ~p|s,0,~p TRUE [/CODE] My Program [CODE] #include "stdafx.h" #include <string> #include <fstream> #include <vector> #include …
Hello Everybody !!! I have a problem about TreeView and ListView. I have a form to manage student. When I add, the data appear on ListView and TreeView at the same time and the same data. Everything works perfectly. But one proble about Delete button. I choose the line from …
Hello Everybody !!! I have the problem about my Digital Clock, You could see this on my attachment. It works perfectly, but one problem that when the second == 10, the label name second lblSed appear "010", when it's up to 11, it appear normally. I dont know what wrong …
Both are good. Base on your favorite and what really want to do ? Both language are strong and most use in programming. C++ with somebody look are great, somebody are different. It depend on your thought.
You can use the array. It is easy to solve your problem First, You have to make the array. Then use make the function to find the Largest and 2nd.
[CODE] #include "iostream.h" #include "Fraction1.h" #include <cmath> class CFraction { private: int numerator; int denominator; public: void Input(); void Output(); void Reduce(); int CheckFration(); CFraction() { numerator = 0; denominator = 1; } virtual ~CFraction(); }; int CFraction::CheckFration() { if(denominator != 0) return 1; return 0; } void CFraction::Reduce() { …
I create the Fraction Input and Output it was fine, and then I try to put the array of the Fraction. Everything work fine until I Compile and execute the Program. This Error appear: Nullreferenceexception object reference not set to an instance of an object. Help me this error! Thanks …
If you allocate the memory with [B]malloc, realloc, calloc [/B], you can use the free to release the memory If you allocate the memory with [B]New [/B], you can use delete[] to release the memory
The End.
nndung179