write on program for do while loop
Answers
Answered by
1
Syntax:
int i=Integer.parseInt(br.readLine());
int n=1;
do
{
System.out.println(“happy birthday “);
}
while(n
int i=Integer.parseInt(br.readLine());
int n=1;
do
{
System.out.println(“happy birthday “);
}
while(n
hridhrita:
can i know about uuuu
Mind blowing
Answered by
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.
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.
Similar questions