SlideServe
Menu
Préférences
© SlideServe · v2026

CSE 1020 - Lab 4

shiela avatar
13 diapositives · 329 Views · Jul 10, 2014

CSE 1020 - Lab 4. TA: Song Huang. Download Microsoft Visual Studio 2010. Create an account on the UNT Microsoft Software download website: https://e5.onthehub.com/WebStore/Security/Signin.aspx?ws=adbe7b34-809b-e011-969d-0030487d8897&vsro=8&action=signout&JSEnabled=1.

CSE 1020 - Lab 4 - slide 1
01 / 13CSE 1020 - Lab 4
1 / 17

Télécharger la présentation

CSE 1020 - Lab 4
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. CSE 1020 - Lab 4 TA: Song Huang

  2. Download Microsoft Visual Studio 2010 • Create an account on the UNT Microsoft Software download website: • https://e5.onthehub.com/WebStore/Security/Signin.aspx?ws=adbe7b34-809b-e011-969d-0030487d8897&vsro=8&action=signout&JSEnabled=1

  3. Create a Project With Visual Studio 2010 • Start Menu -> All Program -> Microsoft Visual Studio 2010 • Select “Microsoft Visual Studio 2010” (-> Visual C++ in the dialog if this is your first time) • File -> New -> Projects • Select “Visual C++” on the left area of the dialog, Select “Empty Project” in the middle, and give the name of the project at the bottom.

  4. Create a Source File for that Project • Find out the “Solution Explorer”: top menu “View” -> “Solution Explorer” • Right Click the folder “Source File”, “Add” -> “New Item”, select “C++ File (.cpp)” , give it a name at the bottom of the dialog, and then click add.

  5. When is the Source File that you create • C:\Users\YourAccount\Documents\Visual Studio 2010\Projects

  6. When You are using Visual Studio • using namespace std; (after #include <iostream>) • system(“pause”); (delete this statement when you copy your program into your web compiler) • use “#include <string>” when you have string type variable in your program.

  7. Important Components in the Programs • Programs are consisted of: • Selection Branches (select the procedures) • Loops (repeat operations)

  8. Selection Branches • if(conditions) { operation 1; operation 2; ……… }

  9. Selection Branches Importance: • There is no “;”, after the conditions, usually, we use “;” to close a statement if you finish the operation. • Use logical operator to connect multiple conditions, for example: “&&”, “||”… • Use bracket { } to include the operations

  10. Selection Branches • if(conditions){ operations; } else if(conditions){ operations; } else{ }

  11. Selection Branches • if(conditions){ operations; } if(conditions){ operations; } if(conditions){ operations; }

  12. Selection Branches - Example • int a = 9; • if(a > 7){ cout << a << endl; } else if(a > 6){ cout << a << endl; } else if(a > 5){ cout << a << endl; }

  13. Selection Branches - Example • int a = 9; • if(a > 7){ cout << a << endl; } if(a > 6){ cout << a << endl; } if(a > 5){ cout << a << endl; }