Computers and Technology

Circle all syntax errors and logic errors in following code, and correct it. there will be more than 14 errors. one correction earns one point until all 14 points are rewarded. however, if the student mark a correct place as wrong and change it, one point will be reduced.
include
using namespace std
int main()
{
int n;
sum = 0;
cout > > "enter a positive integer n: ";
cin < < n; while(n < = 0)
{
cout < < "wrong input. enter a positive integer n: " cin > > n;
}
int i = 1;
// initialization while(i < =n)
//check condition
{
sum += i; i+;
//increase i by 1
}
switch(n)
{
case 1:
cout < < "the sum is" < < sum < < endl;
case 2:
cout < < "the sum of 1+"
break; case 3
cout < < "the sume of 1+2+" < break;
default:
cout < < "the sum of 1+2++" < system(pause);
return 0; }

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 12:10, breezer20042
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
image
Computers and Technology, 24.06.2019 22:00, darthshot4
Iam trying to get my google account back for school and business, can someone ?
Answers: 1
image
Computers and Technology, 25.06.2019 04:00, anthonypacheco
What was the name of the first computer (machine) language?
Answers: 2
image
Computers and Technology, 25.06.2019 08:20, perezsamantha3oqr0za
In the context of computer operations division is a(n)
Answers: 2
Do you know the correct answer?
Circle all syntax errors and logic errors in following code, and correct it. there will be more than...

Questions in other subjects:

Konu
Mathematics, 08.02.2021 20:00
Konu
Biology, 08.02.2021 20:00