Void printtictactoe(char horizchar, char vertchar)
{
int i,j;
int scale = 5;
for(j=0; j<3; j++) {
for (i = 0; i < scale; i++)
printf("%*c%*c\n", scale+1, vertchar, scale+1, vertchar);
if (j < 2)
for (i = 0; i < (scale * 3)+2; i++)
printf("%c", horizchar);
printf("\n");
}
}
I left out many braces because of the layout issues with this website. There is a scale factor you can set to the desired size of the board cells!
Answer:
The program to this question can be given as:
Program:
#include<iostream> //header file
using namespace std;
int main() //main method
{
int x[10],i,largest = 0,second_largest=0,n; //variable
cout << "Enter Number of elements :"; //message
cin>>n;
cout << "Insert array elements :"; //message
for(i=0;i<n;i++) //insert elements in array
{
cin >>x[i];
}
//Finding Largest element
for(i=0;i<n;i++)
{
if (x[i]>largest)
{
largest = x[i];
}
}
//finding second largset element
for(i=0;i<n;i++)
{
if (x[i]>second_largest)
{
if(x[i]==largest)
{
continue; //Ignoring largest in order to get second largest
}
second_largest=x[i];
}
}
//print value
cout <<"Largest Number:"<<largest<<endl;
cout <<"Second Largest Number:"<<second_largest;
return 0;
}
Output:
Enter Number of elements :5
Insert array elements :33
45
75
87
23
Largest Number:87
Second Largest Number:75
Explanation:
In the above program firstly we define the header file then we define the main method in the main method we define the array and other variables. We first input the number for the size of the array. Then we insert array elements after inserting array elements we search the largest number and the second largest number in the array. To search the largest number in the array we use the loop. To search the first largest number we define a condition that array is greater than the largest number and store the value into the largest variable. Then we check the second largest number in the array for this we use two conditions that are array is greater than the second largest number in this we use another condition that is array is equal to the largest number. If the inner condition is true then it will move forward and end of an inner condition. In the outer condition, the value will be stored on the second_largest variable all the conditions will be done inner the loop. At the last we print values.
The first thing that comes to mind is preschool. Then kindergarden. Another one would probably be a daycare center, but I'm not sure that qualifies as a school.
Answer:
1. <em>impr</em><em>ove</em><em> </em><em>air</em><em> </em><em>qua</em><em>lity</em><em>.</em><em>.</em>
<em>2</em><em>. </em><em>Eats</em><em> </em><em>food</em><em> </em><em>rich </em><em>in</em><em> </em><em>antio</em><em>xidants</em><em>.</em><em>.</em><em>.</em>
<em>3</em><em>. </em><em>Stop</em><em> </em><em>smok</em><em>ing</em><em>.</em><em>.</em><em>.</em><em>.</em>
The Step 1 Python CS Fundamentals coding work is given in the document attached below.
<h3 /><h3>
What are the basic fundamentals of Python?</h3>
The basic steps or lessons in Python is made up of:
- Kinds of Data types ( such as int, float, strings)
- The kinds of Compound data structures ( such as lists, tuples, and dictionaries), etc.
Note that by knowing the Step 1 of the Python CS Fundamentals coding work, one can know what to do next. See the document attached for more information.
Learn more about Coding from
brainly.com/question/16397886
#SPJ1