Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have only little experience in C++ programing. I had many projects for C but I

ID: 3642115 • Letter: I

Question

I have only little experience in C++ programing. I had many projects for C but I only need help with one. I need to create a program (any program) using C or C++ statments to input and output information relating to a problem solution or processing and storage of information or use of an algorithm.
I know A simple C language program to read a value is as follows
#include<stdio.h>
int main()
{
int i;
printf("enter a value for i ");
scanf("%d",&i);
return 0;
}

and I also know the algorithm for the program is
first declare a variable i
then ask to enter a value for i
then read the value entered

But I need more insight since its a term project and not just an assignment. Any help will be much appreciated. Thank you!

Explanation / Answer

I hope this helps

#include <iostream>

using namespace std;

int main() {

       int i;

       cout << "Enter an integer: ";

       cin >> i;

       cout << "You entered " << i << endl; //endl is a new line

}