Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include #include using namespace std; int main () { int i,odd,count=0,n,sum=0; /initialize variables cout <

#include #include using namespace std; int main () { int i,odd,count=0,n,sum=0; /initialize variables cout<<"Even numbers between 2 to 40 "; for(i=2;i<=40;i++){ //loop from 2 to 4 if(i%2 == 0){ //check if even ,true then print count++; sum++; std::cout.width(5); std::cout << std::right <=3;i--){ if(i%3==0){//check if multiple of 3 count++; sum++; std::cout.width(5); std::cout << std::right <=2){ std::cout.width(10); std::cout << std::right << p; p=p/2; x++; if(x==8){ //after 8 values print in next line x=0; cout<<" "; } c++; } int num; cout<<" Loop until user enters valid integer i.e not a negative "; cout<<"Enter an integer : "; cin>>num; while(num<0){ cout<<"Invalid entry please re-enter a number :"; cin>>num; } cout<<"You have entered "<

return 0; }

how to write psedue code?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What is the purpose of an IF THEN statement for this lab?

Answered: 1 week ago

Question

help asp

Answered: 1 week ago