Skip to content
TFE Times

TFE Times

Business, Technology, and Culture

Click here
Brandeis University Master of Finance Leaderboard 728x90
RPI Leaderboard
University of North Carolina Charlotte UNCC MFE Master of Mathematical Finance Leaderboard 728x90
MAFI_728x90
Johns Hopkins Financial Mathematics
MAFI_728x90
Click here
NYU Tandon School of Engineering Leaderboard
  • 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++: Move-To-Front Algorithm

September 1, 2017
Bjarne-stroustrup
Next →

C++: Find the Last Sunday of Each Month

September 1, 2017

Related Posts

Bjarne-stroustrup

C++: Binary Search Tree Insertion

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

C++: Black Scholes Put Option Vega

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

C++: Continued Fraction

Posted on September 1, 2017April 1, 2018
Claremont Graduate University Financial Engineering
NYU Tandon School of Engineering Sideboard
University of North Carolina Charlotte UNCC MFE Master of Mathematical Finance Sideboard 300x250
Brandeis Business School
University of Maryland Master of Science in Applied Economics
University of North Carolina Charlotte UNCC MFE Master of Mathematical Finance Sideboard 300x250
Click here
Click here
University of California Berkeley Master of Financial Engineering MFE Sideboard
output_8BgzjE
  • What Instruments Did Each Of The Beatles Play?

    September 30, 2023January 16, 2023 by TFE Times
  • Frontend vs Backend Web Development

    September 29, 2023January 8, 2023 by TFE Times
  • U.S. Cities Ranked By Mobile Network Speed And Coverage

    September 28, 2023January 8, 2023 by TFE Times
  • The Top 25 Country Code Top-Level Domains (CCTLDS) In The World By Number Of Active Domains

    September 27, 2023January 8, 2023 by TFE Times
  • Backpacking: What To Pack

    September 26, 2023January 8, 2023 by TFE Times
  • Which U.S. States Have The Highest Rate Of Child Abuse Cases

    September 25, 2023January 8, 2023 by TFE Times
  • Inbound VS Outbound: Lead Generation

    September 24, 2023January 8, 2023 by TFE Times
  • The 50 Counties With The Highest STD Rates In The United States

    September 23, 2023January 8, 2023 by TFE Times
  • 43 Ships, Boats, & Yachts From Pop Culture

    September 22, 2023January 8, 2023 by TFE Times
  • The Ultimate Steak Doneness Guide

    September 21, 2023January 8, 2023 by TFE Times

Copyright © TFE Times, LLC. All Rights Reserved.

Terms of Service | Privacy Policy | Disclaimer

WordPress Theme : Eight Paper by 8Degree Themes