- •Int main()
- •Int main()
- •Int choice(0);//Здесь сохранитть выбранное значение
- •Int main()
- •Int choice(0);//Здесь сохранитть выбранное значение
- •Int main()
- •Int choice(0);//Здесь сохранитть выбранное значение
- •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(){
- •Int main(){
Int main()
{
int i,x,y,r;
setlocale (LC_ALL,"Rus");
cout<<"--------------------------------------------\n";
cout<<" таблица умнажения\n";
cout<<"--------------------------------------------\n";
i=10;
for(y=1;y<=10;y++){
for(x=1;x<=10;x++){
r=y*x;
cout<<y<<"*"<<x<<"="<<r<<"\n";
}
cout<<"\n";
}
cout<<"\n--------------------------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0; }
// задача do 1.cpp: определяет точку входа для консольного приложения.
//
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#include <stdio.h>
using namespace std;
Int main()
{
float x,y;
float x1,x2,dx;
setlocale (LC_ALL,"Rus");
cout<<"x1=";cin>>x1;
cout<<"x2=";cin>>x2;
cout<<"dx=";cin>>dx;
x=x1;
cout<<"--------------------------------------------\n";
do{
y=-2.4*x*x+5*x-3;
cout<<"\nx="<<x;
cout<<"y="<<y;
x+=dx;
}
while (x<=x2);
cout<<"\n--------------------------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0;}
// задача do 2.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#include <stdio.h>
using namespace std;
Int main()
{
int a,n,s;
float m;
setlocale (LC_ALL,"Rus");
s=0;
n=0;
cout<<"--------------------------------------------\n";
cout<<"Вычисление среднего ариымитического";
cout<<"\nпосдедовательности положитьльных чисел";
cout<<"\nВdдите числа.Для завершения введите ноль\n";
cout<<"--------------------------------------------\n";
do{
cout<<"=>";cin>>a;
if (a>0){
s+=a;
n++;} }
while (a>0);
cout<<"Введено чисел:"<<n;
cout<<"Сумма чисел:"<<s;
m=(float)s/n;
cout<<"\nСреднее арифмитическое:"<<m;
cout<<"\n--------------------------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0;}
// задача do 3.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#include <stdio.h>
using namespace std;
Int main()
{
int a,min;
setlocale (LC_ALL,"Rus");
cout<<"--------------------------------------------\n";
cout<<"Определение минимального числа";
cout<<"\nв последовательности полажительных чисел";
cout<<"\nВвдите числа.Для завершения введите ноль\n";
cout<<"--------------------------------------------\n";
cout<<"=>";cin>>a;
min=a;
while (a>0){
if (a<min)min=a;
cout<<"=>";cin>>a; }
cout<<"\nМинимальное число:"<<min;
cout<<"\n--------------------------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0;}
// задача do 4.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
Int main()
{
int comp,igrok,n,p;
setlocale (LC_ALL,"Rus");
time_t t;
srand((unsigned)time(&t));
comp=rand()%10+1;
cout<<"--------------------------------------------\n";
cout<<"Компьютер загадал число от 1 до 10\n";
cout<<"Вы должны угодать за пять попыток\n";
cout<<"--------------------------------------------\n";
n=0;
do{
cout<<"Ваще число:";cin>>igrok;
n++;
}while((igrok!=comp)&&(n<5));
if(igrok==comp){
cout<<"ВЫ ВЫИГРАЛИ";
if( igrok!=comp)
cout<<"ВЫ ПРОИГРАЛИ";
cout<<"\nКомпьютер задумал число:"<<comp;}
cout<<"\n--------------------------------------------\n";
cout<<"\nДля завершения нажмите <Enter>";
getch();
return 0;}
// цельсия и фарингей2.cpp: определяет точку входа для консольного приложения.
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <clocale>
#include <stdio.h>
using namespace std;
