Versuch, in C ++ einen einfachen Binärzähler zu machenC++

Programme in C++. Entwicklerforum
Anonymous
 Versuch, in C ++ einen einfachen Binärzähler zu machen

Post by Anonymous »

Versuchen Sie, einen einfachen binären Zähler in C ++ zu erstellen: < /p>

Code: Select all

#include 
#include 
#include 
using namespace std;

int c1 = 0;
int c2 = 0;
int c3 = 0;
int c4 = 0;

int main ()
{
condition_variable cv;
for (int i = 15; i > -1; i = i - 1)
{
if ((c1 == 1) and (c2 == 1) and (c3 == 1))
{
int c4 = 1;
int c3 = 0;
int c2 = 0;
int c1 = 0;
}
if ((c1 == 1) and (c2 == 1))
{
int c3 = 1;
int c2 = 0;
int c1 = 0;
}
if (c1 == 1)
{
int c2 = 1;
int c1 = 0;
}
int c1 = (c1 + 1);

system("clear");
cout

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post