Answer:
public class Main
{
public static void printString(String strText, int intNumber) {
for(int i=0; i<intNumber; i++){
System.out.println(strText);
}
}
public static void main(String[] args) {
printString("Brainly", 3);
}
}
Explanation:
- Define a function called <em>printString</em> that takes two parameters - a String and an int. Since the function will print out the given String, it's type will be <u>void</u>.
- Use <em>for loop</em> to iterate according to the given number and print the given string
- In the main, call the <em>printString </em>function with some parameters.
Answer:
B from you search question carefully and identify the key word
Explanation:
Answer:
Here is c program:
#include<stdio.h>
#include<conio.h>
void main()
{
//Variable declaration
//array to hold 6 values you can change this as needed
float nums[6];
//integer i is for loop variable
int i;
//to hold maximum value
float max=0.0;
//clear screen
clrscr();
//iterate 6 times you can change as per your need
for(i=0;i<6;i++)
{
printf("Enter a number:");
scanf("%f",&nums[i]);
//check if entered value is greater than previous value
//if it is greater then assign it
if(nums[i]>max)
max = nums[i];
}
//print the value
printf("The largest number entered was %f",max);
getch();
}
Explanation:
The programs you need for you are not even done yet
It's kind of a mix between A and C there are some defragmenting tools that show you how much of your PC is wasted by program files. And in some defragmenting tools, it shows you all the files that are fragmented and gives you the option to defrag them or not. So the best answer would be A.