Giter Club home page Giter Club logo

test's Introduction

Spielwiese zum Programmieren lernen verschiedenster Sprachen

in den Ordnern:

  • RocksGam3R_Test
    • Programmiersprache 'C'
  • Purpl3Umbr3lla_Test
    • Programmiersprache 'Java'
  • FunGam3R_Test
    • Programmiersprache 'C++'
  • xxhoeckyxx_Test
    • Programmiersprachen 'C und C++'
    • Uebungen der TH

test's People

Contributors

xxhoeckyxx avatar rocksgam3r avatar fungam3r avatar purpl3umbr3lla avatar

Stargazers

 avatar  avatar

Watchers

 avatar

test's Issues

# Aufgabe 25.1.1

Eindimensonale Arrays

How does Arrays work?

Create a C program lotto.c that randomly selects x different numbers from a range of
1 to n determined. x and n should be entered.
Possible processes of this program lotto.c:

I have to write a Programm that let you show "Lottozahlen" in which crreation you want. Shood look like this:

Lottozahlen-Simulation
=======================
Wieviele Kugeln sollen zur Verfuegung stehen (mind. 1 und max 100): 49 ✞✝ ☎✆←֓
Wieviele werden davon gezogen (mind. 1 und max. 49): 6 ✞✝ ☎✆←֓
==== 6 aus 49 ====
12 15 24 32 37 40
Lottozahlen-Simulation
=======================
Wieviele Kugeln sollen zur Verfuegung stehen (mind. 1 und max 100): 7 ✞✝ ☎✆←֓
Wieviele werden davon gezogen (mind. 1 und max. 7): 7 ✞✝ ☎✆←֓
==== 7 aus 7 ====
1 2 3 4 5 6 7
Lottozahlen-Simulation
=======================
Wieviele Kugeln sollen zur Verfuegung stehen (mind. 1 und max 100): 50 ✞✝ ☎✆←֓
Wieviele werden davon gezogen (mind. 1 und max. 50): 12 ✞✝ ☎✆←֓
==== 12 aus 50 ====
10 13 23 25 27 29 33 36 37 41 42 43

Aufgabe 22.3.1

There have to be another way to Subtraction the time in the right way.

  1. Problem:
    If you subtract 00:45 from 00:31 there have to be the time -23:46 but it is 23:46 what defined as wrong

Code function is "richtigstellung_zeit()"

int richtigstellung_zeit(int zeitwert, int wert)
{
  int zeahler = 0,
      zeitwert_alt = zeitwert;
  if (wert == 0 || wert == 1)
  {
    while (zeitwert > 60 || zeitwert < 0)
    {
      if(zeitwert > 60)
      {
        zeitwert = zeitwert - 60;
        zeahler++;
      }
      if(zeitwert < 0)
      {
        zeitwert = zeitwert + 60;
        zeahler--;
      }
    }
  }
  if (wert == 2)
  {
    while (zeitwert > 24 || zeitwert < 0)
    {
      if (zeitwert > 24)
      {
        zeitwert = zeitwert - 24;
        zeahler++;
      }
      if (zeitwert < 0)
      {
        zeitwert = zeitwert + 24;
        zeahler--;
      }
    }
    if(zeitwert_alt > zeitwert)
    {
      zeitwert = -zeitwert;
    }
  }
  return zeitwert;
}

Probably the answer is simple and the only thing to change is from this:

if(zeitwert_alt > zeitwert)
    {
      zeitwert = -zeitwert;
    }

to this:

if(zeitwert_alt < zeitwert)
    {
      zeitwert = -zeitwert;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.