Codewithvrushal
Pages
Home
Gujrat University
C Programs
python programs
Sunday, 12 March 2023
10. Write a java program to display powers of 2 i.e. 2,4,8,16 etc up to 1024 using bitwise operators.
class
Program10
{
public
static
void
main
(
String
args
[])
{
int
a
=
1
;
for
(
int
i
=
0
; i<
11
; i++)
{
System
.
out
.
println
(a << i);
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
python programs
1. sum of two number
C Programs
● Stack ● Queue ● Searching ● Sorting
Gujrat University All Semester Programs
Semester 1 Semester 2 Semester 3 Semester 4 NOTICE: Click To Text And Open It
Unit - 1 Programs
1. Find the Simple Interest. Inputs are principal amount, period in year and rate of interest. 2. Find the area and perimeter of square a...
No comments:
Post a Comment