⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cw7-5.cpp

📁 This is a part of exercises with book Stephan Prata "School of programing" ex.7.1-7.9
💻 CPP
字号:
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
#define dzielnik 2
int main()
{
    int liczba = 0,i = 0,l_parzyste = 0,s_parzyste = 0,l_nieparzyste = 0,s_nieparzyste = 0;
    printf("Podaj liczbe calkowita, 0 konczy program: \n");
    while ((scanf("%d",&liczba) == 1) && (liczba != 0))
    {
          switch (liczba % dzielnik == 0)
          {
                 case 0 : l_parzyste++;
                          s_parzyste += liczba;
                          break;
                 default : l_nieparzyste++;
                           s_nieparzyste += liczba;
                           break;
          }
          printf("Podaj liczb

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -