While loop 1

1 ta n soni kiriting va shu songacha toq sonlarni chop eting

#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n ;
int i = 1;
while(n >= i)
{
if(i%2 != 0 )
{
cout << i <&lt…


This content originally appeared on DEV Community and was authored by Jamoliddin0710

1 ta n soni kiriting va shu songacha toq sonlarni chop eting

#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n ;
   int i = 1;
    while(n >= i)
    {
    if(i%2 != 0 )
    {
        cout << i << " ";
    }
    i++;
    }
}


This content originally appeared on DEV Community and was authored by Jamoliddin0710


Print Share Comment Cite Upload Translate Updates
APA

Jamoliddin0710 | Sciencx (2022-04-23T23:38:57+00:00) While loop 1. Retrieved from https://www.scien.cx/2022/04/23/while-loop-1/

MLA
" » While loop 1." Jamoliddin0710 | Sciencx - Saturday April 23, 2022, https://www.scien.cx/2022/04/23/while-loop-1/
HARVARD
Jamoliddin0710 | Sciencx Saturday April 23, 2022 » While loop 1., viewed ,<https://www.scien.cx/2022/04/23/while-loop-1/>
VANCOUVER
Jamoliddin0710 | Sciencx - » While loop 1. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/23/while-loop-1/
CHICAGO
" » While loop 1." Jamoliddin0710 | Sciencx - Accessed . https://www.scien.cx/2022/04/23/while-loop-1/
IEEE
" » While loop 1." Jamoliddin0710 | Sciencx [Online]. Available: https://www.scien.cx/2022/04/23/while-loop-1/. [Accessed: ]
rf:citation
» While loop 1 | Jamoliddin0710 | Sciencx | https://www.scien.cx/2022/04/23/while-loop-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.