Write a program in C# Sharp to display the cube of the number up to given an integer
- برمجة سي شارب
- برمجة
- 2021-05-17
- MarwaMohammed
الأجوبة
using System;
public class Exercise5
{
public static void Main()
{
int i,ctr;
Console.Write("\n\n");
Console.Write("Display the cube of the number:\n");
Console.Write("---------------------------------");
Console.Write("\n\n");
Console.Write("Input number of terms : ");
ctr= Convert.ToInt32(Console.ReadLine());
for(i=1;i<=ctr;i++)
{
Console.Write("Number is : {0} and cube of the {1} is :{2} \n",i,i, (i*i*i));
}
}
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
