C/C++ C++ Program Problem: Solutions & Tips

  • Thread starter Thread starter Amr719
  • Start date Start date
  • Tags Tags
    C++ Program
AI Thread Summary
The discussion centers on confusion regarding the pseudocode related to a problem description. The initial query highlights a lack of understanding of the code's structure, specifically why certain values, like "units - 500" and "units - 1000," are used. The response clarifies that these lines in the code are a direct translation of the problem description, with "every unit in excess of 1000" being represented as "units - 1000." The conversation emphasizes the importance of understanding how the code reflects the problem's requirements.
Amr719
Messages
31
Reaction score
0
Untitled.png
 
Technology news on Phys.org
I cannot Understand the marked lines
 
The lines in blue in your image pretty well explain what is happening in the pseudocode. Are you having trouble understanding the problem description?
 
No I understand the description. But I don't understand the form of writing the code . Why in the first line he wrote units -500 and why in the second line he wrote units - 1000
 
"every unit in excess of 1000" is (units - 1000)

So the code is a direct translation of the description above.
 
  • Like
Likes pugwazup19755 and Amr719
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top