100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Presentation

computer project for class 10

Rating
-
Sold
-
Pages
17
Uploaded on
27-10-2021
Written in
2021/2022

this document can help class 10 students to complete computer project

Institution
Module










Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Secondary school
Module
School year
4

Document information

Uploaded on
October 27, 2021
Number of pages
17
Written in
2021/2022
Type
Presentation
Person
Unknown

Subjects

Content preview

NAME: ABC
CLASS:
SECTION:
ROLL NO.:

UID CODE:
REGISTRATION NO:
SUBJECT:COMPUTER PROJECT ASSIGNMENT
SCHOOL: ST. XAVIER’S INSTITUTION

,1. WRITE A MENU DRIVEN PROGRAM TO PRINT THE FOLLOWING SERIES:
a. 1,11,111, 1111, .nth term
b. 1,12,123, 1234, …. nth term

import java.util.*;
class prog1
{
public static void main(String[] args) {
int i,ch,n;
Scanner sc=new Scanner(System.in);
System.out.println("enter the value of n");
n=sc.nextInt();
System.out.println("MENU");
System.out.println("1. Series 1");
System.out.println("2. Series 2");
System.out.println("enter a choice");
ch=sc.nextInt();

switch (ch)
{
case 1: int s = 0; // s for terms of series, c for n terms
for (i = 1; i <= n; i++) // To generate n terms
{
s = s * 10 + 1;
System.out.print(s + " ");
}
break;

case 2: int s = 0 ; // s for terms of series, c for counter to generate n terms
for (i = 1; i <= n; i++)
{
s = s * 10 + c;
System.out.print(s + " ");
}
break;
default:
System.out.println("wrong choice");
}//end of switch
}//end of main
}//end of class

/*
enter the value of n
5
MENU
1. Series 1
2. Series 2
enter a choice
1

, 1 11 111 1111 11111

enter the value of n
5
MENU
1. Series 1
2. Series 2
enter a choice
2
1 12 123 1234 12345
*/
$7.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
soumojitguha

Get to know the seller

Seller avatar
soumojitguha
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
4 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions