Posted inPython カレンダーを表示するPythonプログラム Posted by By admin January 23, 2021 以下のプログラムでは、 calendar モジュール。 内蔵機能 month() モジュール内では、年と月を取り込んで、その年のその月のカレンダーを表示します。 ソースコード # Program to display calendar of the given…
Posted inJavascript 再帰を使用して数の階乗を見つけるJavaScriptプログラム Posted by By admin January 22, 2021 数の階乗は、からのすべての数の積です。 1 その数に。 例えば、 の階乗 5 に等しい 1 * 2 * 3 * 4 *…
Posted inPython カードのデッキをシャッフルするPythonプログラム Posted by By admin January 22, 2021 ソースコード # Python program to shuffle a deck of card # importing modules import itertools,…
Posted inJavascript 再帰を使用してフィボナッチ数列を表示するJavaScriptプログラム Posted by By admin January 22, 2021 フィボナッチ数列は次のように記述されます。 0, 1, 1, 2, 3, 5, 8, 13, 21, ... フィボナッチ数列は、最初の2つの項が次の整数列です。 0 そして 1。…
Posted inPython 数の因数を見つけるPythonプログラム Posted by By admin January 22, 2021 ソースコード # Python Program to find the factors of a number # This function computes…
Posted inJavascript カードのデッキをシャッフルするJavaScriptプログラム Posted by By admin January 22, 2021 例:カードのデッキをシャッフルする // program to shuffle the deck of cards // declare card elements const suits…
Posted inPython LCMを見つけるためのPythonプログラム Posted by By admin January 22, 2021 2つの数値の最小公倍数(LCM)は、与えられた2つの数値で完全に割り切れる最小の正の整数です。 たとえば、12と14のLCMは84です。 LCMを計算するプログラム # Python Program to find the L.C.M. of two input number def…
Posted inJavascript 乱数を推測するJavaScriptプログラム Posted by By admin January 22, 2021 例:数を推測するプログラム // program where the user has to guess a number generated by a program…
Posted inPython HCFまたはGCDを見つけるPythonプログラム Posted by By admin January 22, 2021 2つの数値の最大公約数(HCF)または最大公約数(GCD)は、指定された2つの数値を完全に分割する最大の正の整数です。 たとえば、12と14のHCFは2です。 ソースコード:ループの使用 # Python program to find H.C.F of two numbers # define a…
Posted inJavascript 再帰を使用して自然数の合計を見つけるJavaScriptプログラム Posted by By admin January 22, 2021 正の整数 1、2、3、..。 自然数として知られています。 例:再帰を使用した自然数の合計 // program to find the sum of natural numbers using recursion…