Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
To print natural numbers from 1 to 32767
–4
votes
asked
Jul 2, 2018
by
anonymous
closed
Jun 14, 2020
by
Admin
main()
{
int i=1;
while(i<=32767)
{
printf("\n %d",i);
i=i++;
}
}
closed with the note:
Since it as been answered.
18 Answers
0
votes
answered
Jul 14, 2018
by
jagruthi
#include<stdio.h>
void main(){
int i;
for(i=1;i<=32767;i++)
{
printf("%d",i);
}
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jul 15, 2018
by
anonymous
#include <iostream>
int main()
{
int i=1;
while (i<=32767)
{
std::cout<<i<<std::endl;
i++;
}
return 0;
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jul 16, 2018
by
anonymous
,#include<stdio.h>
void main()
{
int i=1;
for(i=1;i<=32767;i++)
{
printf("%d",i);
}
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jul 21, 2018
by
Shankhadip Kundu
(
140
points)
main()
{
long i=1;
while(i<=32767)
{
printf("\n %d",i);
i++;
}
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jul 24, 2018
by
monika murali
#include<stdio.h>
int main()
{
int i;
for(i=1;i<=32767;i++)
{
printf("%d",i);
return(0);
}
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jul 24, 2018
by
anonymous
#include<iostream>
using namespace std;
int main(){
for(int a=1 ;a<=32767;a++){
cout<<a;
return 0;
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jun 10, 2020
by
mahesh
(
470
points)
#include<stdio.h>
main()
{
int i=1;
while(i<=32767)
{
printf("i=%d",i++);
}
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jun 13, 2020
by
mahesh
(
470
points)
#include <stdio.h>
main()
{
int i;
for(i=1;i<=32767;i++)
printf("%d\n",i);
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Page:
« prev
1
2
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...