Write a program using a while loop to print the numbers 2 to 10 in increments of two. The output of your program should be
2 4 6 8 10
1
Expert's answer
2013-03-29T04:47:02-0400
#include <iostream> using namespace std;
int main() { // initial value int num = 2; while (num<=10) { // print current number and space cout<<num<<" "; // increase the number by 2 num += 2; } return 0; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment