Jan 2023 FUNDAMENTALS OF COMPUTER PROGRAMMING Chere L. (M. Tech) Lecturer, SWEG, AASTU Using C++
Jan 2023 “The expert at anything was once a beginner.” – Helen Hayes
Jan 2023 Last Week Feedback Summary
Jan 2023 Practical Exercises Outline ▪ Problem Solving ▪ Programming Writing ▪ Identify programming constructors CHAPTER THREE
Jan 2023 Objectives At the end of this session, you able to ▪ Solve small-scale problems by using problem solving techniques. ▪ Design algorithms using flow chart / pseudocode. ▪ Write a program, compile and execute it. ▪ Explain the process of program translation and execution.
Jan 2023 Exercises
Jan 2023 Algorithm Design and Program Writing 1. Make a program that calculates and display the Body Mass Index (BMI) of a person. The program should read the height and weight of a person being given and display the BMI. 2. Write a program that prompts the capacity in gallons of an automobile fuel tank and the miles per gallons the automobiles can be driven. The program outputs the number miles the automobile cam be driven without refueling. 3. Write a program that converts a letter entered from the keyboard to its uppercase or lower case equivalent (Hint :- use the function defined in ctype.h library header file) 4. Write a program that find the result of the expression 𝑥𝑦 where the value of X and Y are entered by the user.
Jan 2023 Cont. . . . 5. Design an algorithm and write a to read an employee name weekly working hours, bonus rate per hour and base salary and find the employees gross-salary, net salary and bonus payment. (Hint: pension rate – 5%, tax: 15%). 6. A serial transmission line can transmit 960 characters a second. Write a program that will calculate how long it will take to send a file, given the file size. Test your program on a 400MB (419,430,400 byte) file which may take days. 7. Identifying valid variables 8. Define a variable for a given entity/object/process 9. Expression preparation and evaluation.
Jan 2023 Reading Resources/Materials eBooks ▪ Chapter 1, 2 & 3: Problem Solving With C++ [10th edition, University of California, San Diego, 2018; Walter Savitch; ▪ Chapters 2 & 3: An Introduction to Programming with C++ (8th Edition), 2016 Cengage Learning; Diane Zak ▪ Chapter 2: C++ how to program, 10th edition, Global Edition (2017); P. Deitel , H. Deitel
Jan 2023 Last Week Feedback Summary
Jan 2023 Thank You For Your Attention!!

Basic Concepts of Programming - Practical Exercises

  • 1.
    Jan 2023 FUNDAMENTALS OFCOMPUTER PROGRAMMING Chere L. (M. Tech) Lecturer, SWEG, AASTU Using C++
  • 2.
    Jan 2023 “The expertat anything was once a beginner.” – Helen Hayes
  • 3.
    Jan 2023 Last WeekFeedback Summary
  • 4.
    Jan 2023 Practical Exercises Outline ▪Problem Solving ▪ Programming Writing ▪ Identify programming constructors CHAPTER THREE
  • 5.
    Jan 2023 Objectives At theend of this session, you able to ▪ Solve small-scale problems by using problem solving techniques. ▪ Design algorithms using flow chart / pseudocode. ▪ Write a program, compile and execute it. ▪ Explain the process of program translation and execution.
  • 6.
  • 7.
    Jan 2023 Algorithm Designand Program Writing 1. Make a program that calculates and display the Body Mass Index (BMI) of a person. The program should read the height and weight of a person being given and display the BMI. 2. Write a program that prompts the capacity in gallons of an automobile fuel tank and the miles per gallons the automobiles can be driven. The program outputs the number miles the automobile cam be driven without refueling. 3. Write a program that converts a letter entered from the keyboard to its uppercase or lower case equivalent (Hint :- use the function defined in ctype.h library header file) 4. Write a program that find the result of the expression 𝑥𝑦 where the value of X and Y are entered by the user.
  • 8.
    Jan 2023 Cont. .. . 5. Design an algorithm and write a to read an employee name weekly working hours, bonus rate per hour and base salary and find the employees gross-salary, net salary and bonus payment. (Hint: pension rate – 5%, tax: 15%). 6. A serial transmission line can transmit 960 characters a second. Write a program that will calculate how long it will take to send a file, given the file size. Test your program on a 400MB (419,430,400 byte) file which may take days. 7. Identifying valid variables 8. Define a variable for a given entity/object/process 9. Expression preparation and evaluation.
  • 9.
    Jan 2023 Reading Resources/Materials eBooks ▪Chapter 1, 2 & 3: Problem Solving With C++ [10th edition, University of California, San Diego, 2018; Walter Savitch; ▪ Chapters 2 & 3: An Introduction to Programming with C++ (8th Edition), 2016 Cengage Learning; Diane Zak ▪ Chapter 2: C++ how to program, 10th edition, Global Edition (2017); P. Deitel , H. Deitel
  • 10.
    Jan 2023 Last WeekFeedback Summary
  • 11.
    Jan 2023 Thank You ForYour Attention!!