- •Int main()
- •Int main()
- •Int choice(0);//Здесь сохранитть выбранное значение
- •Int main()
- •Int choice(0);//Здесь сохранитть выбранное значение
- •Int main()
- •Int choice(0);//Здесь сохранитть выбранное значение
- •Int main()
- •Int main()
- •Int main() {
- •Int choice(0);//Здесь сохранитть выбранное значение
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main (){
- •Int main (){
- •Int main (){
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main()
- •Int main(){
- •Int main(){
- •Int main(){
- •Int main() {
- •Int main(){
- •Int main(){
- •Int main(){
- •Int main(){
- •Int main(){
- •Int main(){
- •Int main (){
- •Int main(){
- •Int main(){
- •Int main (){
- •Int main(){
- •Int main(){
Int main()
{
float a,b;
setlocale (LC_ALL,"Russian");
cout
<<"Программа сравнивания двух чисел.\n----------------------------------";
cout<<"\nВведите первое число:";cin>>a;
cout<<"\nВведите второе число:";cin>>b;
if (a<b)
cout<<"первое число<второе число";
else if (a=b)
cout<<"первое число=второе число";
else
cout<<"первое число>второе число";
cout<<"\n----------------------------------"
<<endl <<"Для завершения нажмите <Enter>";
getch();
return 0;
}
// четное число.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
using std::cin;
using std::cout;
using std::endl;
Int main()
{
int a,res;
setlocale (LC_ALL,"Russian");
cout
<<"Является ли число четным.\n----------------------------------"
<<"\nВведите число:";cin>>a;
res=a%2;
if (res)
cout<<endl
<<"\nчисло "<<a<<" не четное"<<endl;
else
cout
<<"\nчисло "<<a<<" четное."<<endl;
cout<<"\nДля завершения нажмите <Enter>"
<<endl <<"----------------------------------";
getch();
return 0;
}
// делится на три.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
using std::cin;
using std::cout;
using std::endl;
Int main()
{
int a,res;
setlocale (LC_ALL,"Russian");
cout
<<"делится ли число на три.\n----------------------------------"
<<"\nВведите число:";cin>>a;
res=a%3;
if (res)
cout<<endl
<<"\nчисло "<<a<<" не делится на три"<<endl;
else
cout
<<"\nчисло "<<a<<" делится на три."<<endl;
cout<<"\nДля завершения нажмите <Enter>"
<<endl <<"----------------------------------";
getch();
return 0;
// степень двойки от 0до 10.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
using std::cin;
using std::cout;
using std::endl;
Int main()
{
int n;
int x;
setlocale (LC_ALL,"Rus");
cout<<"\nТаблица степени двойки\n";
cout<<"-----------------------------\n";
x=1;
for(n=1;n<=10;n++)
{
cout<<"\n\nпоказатель степени :"<<n;
cout<<"\n значение 2 встепени n :"<<x;
x*=2;
}
cout<<"\n-----------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0; }
// среднее арифметическое.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#define L 5
using std::cin;
using std::cout;
using std::endl;
Int main()
{
int n;
float a;
float sum;
float sred;
setlocale (LC_ALL,"Rus");
cout<<"\nОбработка последовательности дробных чисел\n";
cout<<"после ввода каждого числа нажмайте <Enter>\n";
cout<<"----------------------------------------------------------\n";
sum=0;
for(n=1;n<=L;n++)
{
cout<<"\nчисло:";cin>>a;
sum+=a;
cout<<"\nВведино чисел:"<<n;
cout<<"\nСумма:"<<sum;
sred=sum/L;
cout<<"\nСред.арифметическое:"<<sred;
}
cout<<"\n----------------------------------------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0; }
// имя имя имя.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#define L 10
using std::cin;
using std::cout;
using std::endl;
