 Darkhann
		
			Darkhann
		
		
		
		
		
		
		
		
	
			10-19-2025 09:49 AM
Create a file where you can write n integers. Rewrite the last group of
perfect numbers from the source file into a text file.
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			10-19-2025 10:23 AM - edited 10-19-2025 10:52 AM
Do you have a question?
(Using a subject of "Labview" in the LabVIEW forum is redundant. A picture of a block diagram is quite useless because we cannot run or debug it and we can't even see what's in the other case, for example.. Why are you counting in orange? Why is there no control for N? What's the purpose of the disconnected boolean switch? Define terms such as "last group". Are you trying to find perfect numbers? What's the purpose of the random integers? There is a =0 primitive, but you could even wire the integer directly to the case selector. To find the first N perfect numbers, you probably need a while loop because you cannot know how many numbers need to be tested It would seem sufficient to calculate the result in memory and write to file at the end., etc.)
10-19-2025 11:05 AM
can you show in practice how to build?
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			10-19-2025 12:10 PM
@Darkhann wrote:
can you show in practice how to build?
The instructions are not clear at all and have no obvious relation to the code in your picture.
For example here is some literal brute force code to find the first N perfect numbers.
For N>4 you would need to make it significantly smarter to complete in a reasonable time and also prevent overflow of I32 later. try it!
And please leave all that file IO out for now. It is just overhead.
10-20-2025 10:59 AM
please send the file ,It doesn't work for me.
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			10-20-2025 11:09 AM - edited 10-20-2025 11:16 AM
So you are posting a blurry picture where the important parts of the code are obstructed by probes and complain that I only attached a clean unambiguous picture without anything hidden, instead of a VI?? 😮
As a first step, learn about conditional tunnels! They are central to the code!
You still have not explained what is meant by "last group".
 billko
		
			billko
		
		
		
		
		
		
		
		
	
			10-20-2025 06:17 PM
This is pretty obviously homework. No we won't do it for you. We can help, though. Create some code. Upload it. We can then work on it together.
 ruzhana
		
			ruzhana
		
		
		
		
		
		
		
		
	
			10-21-2025 12:22 AM
Hello guys! Can you help me for this task, please?
Create a file containing n integers. From the source file,
form arrays of prime and perfect numbers. Determine
the largest prime number in the file and the smallest perfect number.
I’ve almost done it, but I can’t understand how to output prime and perfect numbers.
 GerdW
		
			GerdW
		
		
		 
		
		
		
		
		
	
			10-21-2025 01:40 AM - edited 10-21-2025 01:40 AM
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			10-21-2025 09:48 AM
@ruzhana wrote:
I’ve almost done it, but I can’t understand how to output prime and perfect numbers.
No, you have not "almost" done it! All we see is a pile of senseless code fragments. You are maybe 5% done!
@ruzhana wrote:Create a file containing n integers.
Where does it say random integers? A ramp of integers 1..100, or N integers that are all zero would fit the sparse requirements equally well. So go back and read the exact requirements or ask your teacher.
Also note that your random integer generation is flawed, because the edge values only have half the probability of all the others. With this kind of coding you'll never get a programming job in Las Vegas. 😄
You keep posting blurry pictures instead of the actual VI. Why?
Don't have wires flowing in all directions and underneath structures. Don't wire N when autoindexing on a FOR loop, Why do you need two "%d" diagram constants? etc. Clean code is easier to debug and there are many fewer places for bugs to hide.