Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Tau-function/Verilog/tau-function.v
Normal file
20
Task/Tau-function/Verilog/tau-function.v
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
module main;
|
||||
integer N, T, A;
|
||||
|
||||
initial begin
|
||||
$display("The tau functions for the first 100 positive integers are:\n");
|
||||
for (N = 1; N <= 100; N=N+1) begin
|
||||
if (N < 3) T = N;
|
||||
else begin
|
||||
T = 2;
|
||||
for (A = 2; A <= (N+1)/2; A=A+1) begin
|
||||
if (N % A == 0) T = T + 1;
|
||||
end
|
||||
end
|
||||
|
||||
$write(T);
|
||||
if (N % 10 == 0) $display("");
|
||||
end
|
||||
$finish ;
|
||||
end
|
||||
endmodule
|
||||
Loading…
Add table
Add a link
Reference in a new issue