This is about : C# Program for Array solving problems
And this article : C# Program for Array solving problems
Article Csharp, Article programs,
C# Program for Array solving problems
C# Program for Array solving problems
Program Statement:
Write a function which takes four arrays of same size as arguments; array1, array2, array3, array4. The function will multiply the corresponding values of array1 and array2 and will save the result at same index of array3. i.e. array3[0] = array1[0] * array2[0] and so on. Then create another function and pass all four arrays to that function as argument where you have to compare array1, array2 and array3 and save the max value in array4 i.e. if array1[0] = 10, array2[0] = 5, array3[0]= 11 then you have to save max value i.e. array4[0] = 11. In main function, show all values of array4.
Solution:
class _arr
{
public void mul(int n, int[] array1, int[] array2, int[] array3)
{
for (int i = 0; i < n; i++)
{
array3[i] = array1[i] * array2[i];
}
Console.Write("\nArray3 = Array1 * Array2 : ");
for (int i = 0; i < n; i++)
{
Console.Write("{0} ", array3[i]);
}
Console.WriteLine();
}
public void com(int n, int[] array1, int[] array2, int[] array3, int[] array4)
{
for (int i = 0; i < n; i++)
{
int max = 0;
if (array1[i] >= array2[i] && array1[i] >= array3[i])
max = array1[i];
else if (array2[i] > array3[i])
max = array2[i];
else
max = array3[i];
array4[i] = max;
}
Console.Write("\nMaximum numbers in array are : ");
for (int z = 0; z < n; z++)
{
Console.Write("{0} ", array4[z]);
}
Console.WriteLine("\n");
}
}
Articles C# Program for Array solving problems finished we discussed
A few of our information about the C# Program for Array solving problems, I hope you can exploit carefully
No've You've finished reading an article on C# Program for Array solving problems and many articles about modern home in our blog this, please read it. and url link of this article is https://liveeconcerts.blogspot.com/2014/02/c-program-for-array-solving-problems.html Hopefully discussion articles on provide more knowledge about the world of tech gadgets.
Tag : Csharp, programs,
Fastened headsets intended to be enormous, they are costly, and just blog as they are likewise asset concentrated. They likewise guarantee increasingly creative movement detecting and head-following capacities in inverse to versatile headsets. Other than that, blog not simply the bigger headsets comprise of blog widely committed movement sensors, they likewise regularly work in mix with outside cameras to all the more precisely track the client's head. Adding to that, they're additionally intended to work with real controls, beginning from consoles and gamepads to increasingly select prospects. The market is moderately later and the items still minimal known to a huge piece of experts and people, the main blog acquisition of a headset Virtual Reality can appear to be troublesome. Be that as it may, it is sufficient to decide your requirements in Virtual Reality, and to consider certain specialized models, to blog purchase your VR Headset effortlessly. VR 360 encourages you in this procedure by summing up the fundamental standards of decision.
ReplyDeleteWow! This blog looks exactly like my old one! It's on a entirely different topic but it has pretty much the same page layout and design. Outstanding choice of colors!
ReplyDelete大学毕业证购买 英国大学文凭 美国大学文凭 留信网认证
Nice Informative Blog having nice sharing Thanks.
ReplyDelete毕业证购买 本科文凭购买 美国大学毕业证购买 教留服认证 留信认证
Way cool! Some extremely valid points! I appreciate you penning this write-up and also the rest of the website is extremely good.
ReplyDelete美国毕业证 美国毕业证成绩单办理 美国大学毕业证办理 英国大学毕业证办理 加拿大大学毕业证办理 新西兰大学毕业证办理