C++ Program for Tricky Questions Using While Loop

Master C++ with Real-time Projects and Kickstart Your Career Start Now!!

Program 1

#include<iostream>
#define clrscr() system("cls")
using namespace std;
int main()
{
    int a=5;
    while(a);
    {
        cout<<"Hello"<<endl;
        a--;
    }
    // char ch='A';
    // clrscr();
    
    // while(ch<='Z')
    // {
    //     std::cout<<ch<<"\n";
    //    ch++;
    // }
    return 0;
}

 

Did we exceed your expectations?
If Yes, share your valuable feedback on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *