Skip to content
TFE Times

TFE Times

Business, Technology, and Culture

Click here
NYU Tandon School of Engineering Leaderboard
RPI Leaderboard
Click here
University of California Irvine Leaderboard
University of California Irvine Leaderboard
MAFI_728x90
Brandeis University Master of Finance Leaderboard 728x90
Click here
MAFI_728x90
  • Business
  • Culture
  • Technology
  • International Rankings
    • Bangladesh
    • Canada
    • Egypt
    • India
    • Nigeria
    • Pakistan
    • Philippines
    • United Kingdom
    • United States of America
  • Masters Rankings
    • Accounting
    • Business Analytics
    • Chiropractic
    • Computer Engineering
    • Computer Science
    • Economics
    • Education
    • Finance
    • Financial Economics
    • Financial Engineering
    • Law
    • Management
    • Marketing
    • MBA
    • Nursing
    • Social Work
  • Resources
    • C++
      • Beginner’s Guide to C++
      • An Introduction to the Imperative Part of C++
      • C++ Code
        • Sorts
        • Binary Search Trees
        • Strings
        • Binary Search
        • Math
        • Quant
        • Puzzles/Games
        • Language Concepts
        • Graphics
        • OS Operations
        • Graphs
      • C++ Full Course
      • C++ Crash Course
      • C++ Interview Questions
      • C++ Q/A
      • C++ Books
      • C++ Free Books
      • C++ Videos
    • C Questions
    • C Programming Tips
    • Java Questions
    • Quant Data Sources
    • Quant Questions

C++: Do While Loop

Posted on September 1, 2017April 1, 2018 by TFE Times
Posted in C++Tagged c, do while, loop, loops
Bjarne-stroustrup
 


Start with a value at 0. Loop while value mod 6 is not equal to 0. Each time through the loop, add 1 to the value then print it. The loop must execute at least once.

int val = 0;
do{
   val++;
   cout << val << endl;
}while(val % 6 != 0);

SOURCE

Content is available under GNU Free Documentation License 1.2.

Related

Post navigation

Bjarne-stroustrup
← Previous

C++: Continuous Knapsack Problem

September 1, 2017
Bjarne-stroustrup
Next →

C++: Find the Last Sunday of Each Month

September 1, 2017

Related Posts

Bjarne-stroustrup

C++: Multifactorial

Posted on September 1, 2017April 1, 2018
Bjarne-stroustrup

C++: Environment Variables

Posted on September 1, 2017April 1, 2018
Bjarne-stroustrup

C++: Standard Error

Posted on September 1, 2017April 1, 2018
Brandeis Business School
University of California Irvine Leaderboard
Click here
NYU Tandon School of Engineering Sideboard
output_8BgzjE
University of California Berkeley Master of Financial Engineering MFE Sideboard
  • conversation

    A Practical Guide to Using AI Conversation Models for Multilingual Customer Service

    December 9, 2025 by TFE Times
  • World’s Biggest Cryptos In 2025

    December 9, 2025November 28, 2025 by TFE Times
  • Job Cuts By U.S. State In 2025

    December 8, 2025November 28, 2025 by TFE Times
  • U.S. Flight Cancellations

    December 7, 2025November 28, 2025 by TFE Times
  • The Rise Of China’s R&D Spending

    December 6, 2025July 20, 2025 by TFE Times
  • Revenue Per Employee At Tech Firms

    December 5, 2025July 20, 2025 by TFE Times
  • selfie

    How Selfie Verification is Keeping Online Dating Users Safe

    December 4, 2025 by TFE Times
  • Top Countries By Telecom Investment

    December 4, 2025July 20, 2025 by TFE Times
  • Ways Proactive Risk Tools Help Organizations Capitalize on Emerging Opportunities

    December 3, 2025 by TFE Times
  • Moving to the USA: Why Hoboken Is the Perfect First Stop

    December 3, 2025 by TFE Times

Copyright © TFE Times, LLC. All Rights Reserved.

Terms of Service | Privacy Policy | Disclaimer

WordPress Theme : Eight Paper by 8Degree Themes