Computer Science, asked by hridhrita, 1 year ago

write on program for do while loop

Answers

Answered by professorfart
1
Syntax:
int i=Integer.parseInt(br.readLine());
int n=1;
do
{
System.out.println(“happy birthday “);
}
while(n

hridhrita: can i know about uuuu
professorfart: My name is Atharva and I study in Pune .currently in 9th std
hridhrita: thanks
hridhrita: if u want to know about me can ask
professorfart: Yes but it’s ok if u don’t tell
hridhrita: hi i'm hridhrita studying in class 8
professorfart: You have been taught java in 8th std.
professorfart: Mind blow ingredients
professorfart: Sorry
Mind blowing
hridhrita: i didn't understand what u said
Answered by samuelpaul
3
Hello! Buddy,

Your answer goes like this ...

#include<iostream.h>
#include<conio.h>
void main[]
[
int x=0;
while[x<10];
[
cout<<"we are Indians";
cout<<endl;
x++;
]
getch[]
]

Do while loop:
#include<iostream.h>
#include<conio.h>
void main[]
[
float number,sum=0.0;

do[
cout<<"Enter a number";
cin>>number;
sum+=number;
]
while[number !=0]

cout<<"Total sum="<<sum;

return 0;

]

Thank you dear,

Hope It helps.

samuelpaul: What do you Wanna know ?
hridhrita: in which standard u r in
samuelpaul: 10 sister
hridhrita: o brooooo
hridhrita: best o luck ur board
hridhrita: brother
samuelpaul: haha thank you but please dont chat here
hridhrita: ok... sorry
hridhrita: it's formal
samuelpaul: Hmm\
Similar questions