write a program to display your school name three times
Answers
Answered by
0
Answer:
#include<stdio.h>
int main() {
for(int i =0;i<3;i++) {
printf("schoolname") ;
}
}
Answered by
2
Question:-
Write a program to display your school name 3 times.
Code:-
In Java.
import java.util.*;
class School_Name
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter your school name: ");
String s=sc.nextLine();
for(int i=1;i<4;i++)
System.out.println("Your school name is: "+s);
}
}
In Python.
s=input("Enter your school name: ")
for i in range(0,3): #start of for loop
print("Your school name is: ",s)
Similar questions