Предмет: Информатика, автор: itersandra97

Язык программирования c# в Visual Studio
Написать программу, которая выводит на экран квадрат Пифагора
– таблицу умножения

Приложения:

Ответы

Автор ответа: rerewq
1

Ответ:#include<stdio.h>

int main()

{

int y[10][10];// задаем двумерный массив y 10 строк, 10 столбцов  

  int i,j; // переменные целого типа, отвечающие за строки, столбцы

   for(i=1;i<10;i++) { //цикл по строкам

       for(j=1;j<10;j++){ //цикл столбца

           y[i][j]=i*j; //i это индекс строки, j – индекс столбца

           printf("%6d",y[i][j]); //выводим элементы на экран

       }

       printf("\n"); //\n - перевод на новую строку для корректного отображения нашей таблицы

   }

}

Объяснение:

//i*j происходит перемножение элементов начиная с еденицы, т.е 1*1=1, затем 1*2=2, 1*3=3 и т.д  

//когда j<10 т.е 1*9=9, будем умножать i=2, т.е 2* 1=2, 2*2=4 и т.д


rerewq: Если ты работаешь в visual studio, ошибки должны описываться
itersandra97: The name 'printf' does not exist in the current context
rerewq: "%6d" - это форматирование вывода оператора printf()
itersandra97: в скобках будет показфывться, что в скобках, нажав f5 я увижу %6d
rerewq: На будущее, не пытайтесь лезть в программирование
itersandra97: не умеете объяснять, а только копировать и вставлять, то лучше не пытаться выкаблучиваться
rerewq: Все объяснение приложены в коде, не мои проблемы почему вы не понимаете, и почему у вас ничего не получается. На просторах интернета достаточно литературы
itersandra97: вы скопировали и вставили сами не понимаете что. поэтому я сюда и написала. ответил к сожалению школьник, который в этом ничего не понимает
itersandra97: вы видимо никогда не работали и не открывали данную программу, раз пишете этот бред
sanchoys1401: Это язык C, а вас попросили написать на языке C#
Похожие вопросы
Предмет: Английский язык, автор: VladusCheaterVRoblox
ПОМОГИТЕ СРОЧНО! ДАЮ 53 БАЛЛА
Промежуточная аттестация по английскому языку за 6 класс

2. Вариант

GRAMMAR

1. Underline the correct item (3 acres

eg That blue car over there is their theirs.

13. What's yours/her phone number?

21. What is his/hers address?

3) Is this football his/her?

4). Their Theirs house is very modern. 5) Tom and Sarah are my/mine friends.

2. Complete the sentences with at, on or in. (5 scores)

eg. My brother's birthday is on Saturday, 1) I see my family the weekend

2). Dad wakes up at 8 o'clock.....the morning.

3) Sally's birthday is.. December.

4) Sam and Tony play basketball Mondays 5). They go to bed 9:30 p.m.

3. Choose and underline the correct verb (5 scores)

eg They often to the cinema. algab goes c) are going

He... to school yesterday.

a) goes b) went c) is going

2. My mum. a book two years ago. a) buys b) bought e) buy

3. She her hair three times a week.

a)wash b).is washing e) washes

4. Katherine... at the moment.

alsleeps b) is...sleeping c).slept

5.He... football very often.

alplay b), is playing c), plays

4. Fill in the correct prepositions (3 scores).

eg. I am fond of painting. 1. He is interested... roller-skating

2 My sister is keen... reading.

3. Jane's little daughter is very good...dancing!

5. Put the words in the correct order to make sentences (2 scores).

1. are/wearing/What/they?

2. watching/not/Susan/is/a/film/ now.

6. Reading

Read the text and answer the questions. (5 scores)

My name is Fran and I'm ten years old. My best friend is Susan and she's twelve years old. Susan is very smart and she can do a lot of things Susan can play the guitar and the piano. She is very good at sports. She can swim very well and she can sail a boat. I can't swim very well and I can't sail a boat. Susan cooks lunch for herself and her little brother every day. I can't cook because my mum says I'm too young. There is one thing that Susan and I 1) How old is Fran's

can't do. We can't drive a car!

best friend?

2). Who cooks lunch

every day?

3)

What can Susan

play?

4). Who can sail a boat?

5). What can't Fran and Susan do?
Предмет: География, автор: YARMAKTS