how to write a program to print our school name four times in separate lines
Answers
Answered by
0
//Using C programming Language
#include<stdio.h>
#inlucde<conio.h>
#include<string.h>
void main()
{
char name;
printf("Enter you school name ");
scanf("%s", &name)
printf("%s \n%s\n%s\n%s", name,name,name,name);
getch();
}
Answered by
2
Answer:
To print your school name four times using C++ :
#include<iostream>
using namespace std;
int main()
{
int i;
for (i = 0; i<=4 ; i++)
{
cout<<"School name"<<endl;
}
return 0;
}
To print your school name four times using Java:
public class name
{
public static void display( )
{
int i;
for (i = 0 ; i<=4 ; i++ )
{
System.out.println("School Name") ;
}
}
}
Similar questions
Physics,
5 months ago
Business Studies,
5 months ago
English,
10 months ago
Physics,
10 months ago
Accountancy,
1 year ago