7 kyu

FromPascalToCpp

Description:

One day when I was little, I had to write a cycle, but I did not know how to do it, and I did not have internet. So I tried to find a solution in the book. I only had a Delphi book (Pascal). And I found the piece of code that suits me:

begin
    repeat
        Sum := Sum + start;
        start := start + 1;
    until(start>=finish);
end;

And put it in the code. But it does not work. I found out that instead of := on C++ you need to put =. And I replaced it, but it still did not work. Could you help me to adapt the code to C++. But I have one condition: You can not change the code that is written in Pascal. In the test, the code should also work.

Debugging
Fundamentals

More By Author:

Check out these other kata created by YOSYA

Stats:

CreatedApr 3, 2018
PublishedApr 3, 2018
Warriors Trained633
Total Skips36
Total Code Submissions1168
Total Times Completed186
C++ Completions186
Total Stars5
% of votes with a positive feedback rating75% of 57
Total "Very Satisfied" Votes37
Total "Somewhat Satisfied" Votes12
Total "Not Satisfied" Votes8
Total Rank Assessments7
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • YOSYA Avatar
  • ZED.CWT Avatar
Ad