C
C#3y ago
4

how can i get the product of the numbers in the result?

i cant fix it
25 Replies
Becquerel
Becquerel3y ago
$code
MODiX
MODiX3y ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
4
4OP3y ago
using System.Data;
using System.Text;

namespace hasil
{
public class calculate
{

static void PrintNum(params object[] number)
{

foreach (int i in number)

Console.Write(i);

}

static void arr()
{

Console.Write("How many numbers do you want to multiply?:");

int limit = Convert.ToInt32(Console.ReadLine());


int[] number = new int[limit];



for (int i = 0; i < limit; i++)
{
Console.Write($"Number{i + 1}:");
number[i] = Convert.ToInt32(Console.ReadLine());

}


Console.Write("----------------------\nResult: ");

for (int i = 0; i < limit; i++)
{


Console.Write($"{number[i]}");
Console.Write("*");


}
Console.WriteLine();

for (int i = 1; i < number.GetLength(0); i++)
{
i *= number[i];
Console.WriteLine(i);
}

}





public static void Main()
{
arr();



}



}
}
using System.Data;
using System.Text;

namespace hasil
{
public class calculate
{

static void PrintNum(params object[] number)
{

foreach (int i in number)

Console.Write(i);

}

static void arr()
{

Console.Write("How many numbers do you want to multiply?:");

int limit = Convert.ToInt32(Console.ReadLine());


int[] number = new int[limit];



for (int i = 0; i < limit; i++)
{
Console.Write($"Number{i + 1}:");
number[i] = Convert.ToInt32(Console.ReadLine());

}


Console.Write("----------------------\nResult: ");

for (int i = 0; i < limit; i++)
{


Console.Write($"{number[i]}");
Console.Write("*");


}
Console.WriteLine();

for (int i = 1; i < number.GetLength(0); i++)
{
i *= number[i];
Console.WriteLine(i);
}

}





public static void Main()
{
arr();



}



}
}
I can't find the issues here but I know there's a lot of trouble here
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
this is my homework, i can't use it because i haven't learned this lesson yet Is there any other way to write this?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
loops i dont know what is the lambdas
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
can i write this inside in method ? (sorry im bad at english leanguage)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
waow
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
but u speake better than me
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
thank u very much
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
how ?(i cant understand this )
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
I got it now
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
im still cant write this @Eugene pls help me a last time How do I multiply the numbers I gave at the beginning to each other at the end?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
because i translate it with google translate
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
4
4OP3y ago
I actually didn't understand how to operate
Want results from more Discord servers?
Add your server