1 / 8

Beginner C++ Programming Exercises in Visual Studio 2008

Discover basic programming exercises using C++ in Visual Studio 2008. This guide walks you through how to create a simple project and includes two hands-on exercises: displaying a greeting message and swapping two integer values entered by the user. Each exercise includes clear solutions with coded examples to help you understand the syntax and functionality of C++. Perfect for beginners looking to strengthen their programming skills and familiarize themselves with the C++ language.

ankti
Télécharger la présentation

Beginner C++ Programming Exercises in Visual Studio 2008

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming 1 C++

  2. Blog : http://summercs240.wikisapces.com Software: Visual Studio 2008 .

  3. File  New Project

  4. Project  add new item

  5. Example #1 #include <iostream> using namespace std; int main() { cout << "Enjoy yourself with C++!" << endl; return 0; }

  6. Exercise 1: • Write a program that display your “ Hello YOUR NAME “ • Solution : #include <iostream> using namespace std; int main() { cout << “Hello Aseel " << endl; return 0; }

  7. Exercise 2: • Write a program to swap two integer numbers that entered from user • Solution : #include <iostream> using namespace std; int main() { int number1; int number2; cout<< "please enter first number : " << endl; cin >> number1; cout<< "please enter second number : " << endl; cin >> number2; cout<< "Numbers after swapping : " << number2 << " " << number1 << endl ; return 0; }

More Related