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

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Versuch, in C ++ einen einfachen Binärzähler zu machen

by Anonymous » 20 Mar 2025, 21:09

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

Top