Write a c program to print prime numbers from 1 to 100 using for loop

See also amicable numbers. Harshad number A Harshad number is a number that is divisible by the sum of its own digits. Harshad numbers are also known as Niven numbers. A Harshad amicable pair is an amicable pair m, n such that both m and n are Harshad numbers.

Write a c program to print prime numbers from 1 to 100 using for loop

History[ edit ] Mount Sumbing surrounded by rice fields. Java's volcanic topography and rich agricultural lands are the fundamental factors in its history. Fossilised remains of Homo erectuspopularly known as the " Java Man ", dating back 1.

write a c program to print prime numbers from 1 to 100 using for loop

Out of these village alliances, small kingdoms developed. The chain of volcanic mountains and associated highlands running the length of Java kept its interior regions and peoples separate and relatively isolated.

Only the Brantas and Sala rivers could provide long-distance communication, and this way their valleys supported the centres of major kingdoms. A system of roads, permanent bridges and toll gates is thought to have been established in Java by at least the midth century.

Local powers could disrupt the routes as could the wet season and road use was highly dependent on constant maintenance. Subsequently, communication between Java's population was difficult. Medang's religion centred on the Hindu god Shivaand the kingdom produced some of Java's earliest Hindu temples on the Dieng Plateau.

Around the 8th century the Sailendra dynasty rose in Kedu Plain and become the patron of Mahayana Buddhism.

Java - Wikipedia

This ancient kingdom built monuments such as the 9th century Borobudur and Prambanan in central Java. Around the 10th century the centre of power shifted from central to eastern Java. The eastern Javanese kingdoms of KediriSinghasari and Majapahit were mainly dependent on rice agriculture, yet also pursued trade within the Indonesian archipelago, and with China and India.

Majapahit was established by Wijaya [23]: Hayam Wuruk's prime minister, Gajah Madaled many of the kingdom's territorial conquests. During this era, the Islamic kingdoms of DemakCirebonand Banten were ascendant.

The Mataram Sultanate became the dominant power of central and eastern Java at the end of the 16th century. The principalities of Surabaya and Cirebon were eventually subjugated such that only Mataram and Banten were left to face the Dutch in the 17th century.

Colonial periods[ edit ] Tea plantation in Java during Dutch colonial periodin or before Java's contact with the European colonial powers began in with a treaty between the Sunda kingdom and the Portuguese in Malacca.

Abundant number

After its failure the Portuguese presence was confined to Malacca, and to the eastern islands. Ina four-ship expedition led by Cornelis de Houtman was the first Dutch contact with Indonesia. Internal conflict prevented the Javanese from forming effective alliances against the Dutch. Remnants of the Mataram survived as the Surakarta Solo and Yogyakarta principalities.

Javanese kings claimed to rule with divine authority and the Dutch helped them to preserve remnants of a Javanese aristocracy by confirming them as regents or district officials within the colonial administration.

C Program Print Student Marklist See also amicable numbers. Harshad number A Harshad number is a number that is divisible by the sum of its own digits.
C programming Interview questions and answers: C program examples | Interview Complete List Computation[ edit ] If efficiency is not a concern, computing factorials is trivial from an algorithmic point of view:

Java's major role during the early part of the colonial period was as a producer of rice. In spice producing islands like Bandarice was regularly imported from Java, to supply the deficiency in means of subsistence. During the short-lived Daendels administration, as French proxy rule on Java, the construction of the Java Great Post Road was commenced in The road, spanning from Anyer in Western Java to Panarukan in East Java, served as a military supply route and was used in defending Java from British invasion.

C questions and answers

InJava was returned to the Dutch under the terms of the Treaty of Paris.For problems that require extensive computation, a C++ program can race through billions of examples faster than most other computing choices. Write a C program to print even numbers between 1 to using for and while loop.

Write a C program to print even numbers between 1 to N. In this tutorial, we are going to write a c program which prints even numbers between 1 to for Statements¶.

The for statement in Python differs a bit from what you may be used to in C or Pascal. Rather than always iterating over an arithmetic progression of numbers (like in Pascal), or giving the user the ability to define both the iteration step and halting condition (as C), Python’s for statement iterates over the items of any sequence (a list .

Factorial - Wikipedia

Figure 1. Various numeral systems have been used throughout the ages. The earliest, such as the Egyptian, used a simple pen stroke or a mark in clay to represent 1; other numbers up to 9 were formed by repeating the 1 symbol.

How to split a number into two prime numbers. Write a C++ program to split a number in two prime numbers. The Sieve of Eratosthenes is a simple algorithm that finds the prime numbers up to a given integer..

Task. Implement the Sieve of Eratosthenes algorithm, with the only allowed optimization that the outer loop can stop at the square root of the limit, and the inner loop may start at the square of the prime just found.

Programming Tutorials: C Program to Print Even Numbers between 1 to using For and While Loop