subject

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; }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
question
Computers and Technology, 24.06.2019 22:30
To include a watermark or page border on a word document, you will first need to navigate to the tab. file home insert design
Answers: 1
You know the right answer?
Circle all syntax errors and logic errors in following code, and correct it. there will be more than...
Questions
question
Mathematics, 15.07.2019 08:30
question
Health, 15.07.2019 08:30
question
Mathematics, 15.07.2019 08:30
question
Social Studies, 15.07.2019 08:30
Questions on the website: 13722367