Home Tutorialhelp Comment c programming Language

 
 

Comment

ASH89
c programming Language,
April 19, 2010 at 6:48 PM

int main()
{
int i = 1, c = 0, sum = 1,j ;
scanf("%d", &j);

while (i <= j)
{

sum = sum + (i /3+i/5);
printf("%d\n", sum);
i = i +i/3+i/5;
}
}


i've tried to compile this program but my output is 1...and its doesnt stop.
i dont know where my mistake is.
my output should be;
if i entered 3, then 1.00000, 1.3333 should come out
View All Comments | View Tutorial
Related Tutorial and Articles
WebSevices Questions

programming questions
programming questions  this is my assignment questions please help me... the programs in c# language Describe the following with respect... concepts. Write a program in C# language to perform the following operations: a. Basic 

Java Beginners

C++ programming language - Java Beginners
C++ programming language  int main() { int i = 1, c = 0, sum = 1,j ; scanf("%d", &j); while (i <= j) { sum = sum + (i /3+i/5); printf 

Java Beginners

c programming language - Java Beginners
c programming language  int main() { int i = 1, c = 0, sum = 1,j ; scanf("%d", &j); while (i <= j) { sum = sum + (i /3+i/5); printf("%d 

General

Ask C/C++ Questions online
purpose programming language that can run on most of the platforms. C is used... Bell Laboratory while C++ is a popular object oriented programming language... programming language and are widely used in developing software. C and C 

Java Beginners

Learning programming language - Java Beginners
Learning programming language  Hi, I am srikanth i want to learn java programming language without knowing C language.I am very new to programming and i want to learn this language.Can you suggest me to learn the language 

Programming Tutorials

An Overview of Java      Java is a programming language      Java is Object Oriented Programming
; Java as a programming language Java is an Object oriented application programming language developed by Sun Microsystems. Java is a very powerful general-purpose programming language.   

Free Books

C and C++ books-page10
; The programming language C As a programming language, C is rather... offers an introduction to the C++ programming language. It is a guide for C/C... should realize that extensive knowledge of the C programming language is actually 

Java Beginners

C Programming
C Programming  hi,how can i write a program in C programming to place reservation in air plane from the menu let the user to inter his/her gender(W or M)and draw seats by using ascii codes and choose where he/she will sit 

Applet Questions

c programming
c programming  write a program to input five numbers by using while loop in c programing 

General

Why Java as a programming Language?
Why Java as a programming Language?       Why Java as a  programming Language? Java is a general-purpose, high-level programming language, which provides a powerful and full 

Java Beginners

c programming
c programming  Write a Program in 'C' to print the following output 'n' rows. for example, if n:3, the following should be output by the program : 1 1 2 L r 2 3 2 1 1 2 L 1 

Java Beginners

c programming
c programming  Write a Program in 'C' to print the following output 'n' rows. for example, if n:3, the following should be output by the program : 1 1 2 L r 2 3 2 1 1 2 L 1 

Design concepts & design patterns Questions

R programming language.
R programming language.  i want to know about R-programming language. what is it? how to work on it? if possible provide me a ebook on the topic 

Java Beginners

Java Programming Language
Java Programming Language  Hi, For beginner which programming concepts is important? Discuss the importance of Java programming language. In the discussion please let's know how to use Java in developing web applications 

Java Beginners

Programming
Programming  how to save output of java file in .txt format?   Hi, If you are running the example from dos prompt you can use the > bracket to direct the output to a text file. Here is the example: C:>java 

Free C++ books

C/C++ Programming Books
; Object-Oriented Programming and The Objective C Language... language like C++. In this ebook we give you a good start for a programming standard.... The first part teaches C++, the language of choice for general-purpose programming 

Java Beginners

programming error - Java Beginners
programming error  import java.io.*; import javax.servlet.*; import..."); PrintWriter out=res.getWriter(); //String C=req.getParameterValues("C1"); try... PlaceAd"); out.println("Language :"); out.println(""); while(rs4.next 

Java Technology Tutorials

Java Programming Language
Introduction to Java programming Language Java is one of the Object-Oriented programming language used to create various types of applications.  James A. Gosling developed the Java programming language in the year 1995 at Sun 

Java Beginners

Top Programming Languages of 2013
programming language will be: C# .NET Java C Programming Language Java programming Language Objective C Share you comment below. Thanks...Top Programming Languages of 2013  Hi, What will be the Top 

General

Java programming
programming fully is an object-oriented language, and this is very similar to C++. Java...; Java programming language is useful for development of enterprise grade... and VCRs to communicate. Java as programming language was first slated to appear 

Development process Questions

C Programming SubString Program
C Programming SubString Program  Sir I want to Check whether the Single Substring is present in the given 3 string. characters. eg if i entered First String- CPROGRAMMING Second String- CPROGRAM third String- PROGRAMMING if i 

Java Interview Questions

programming problem
programming problem   Kingdom of Maplewood is a beautiful country... 0 to C based on his previous performance. As your team won the last yearââ?¬â... with it. Write a program in the language of your choice to complete the task.    

Design concepts & design patterns Questions

c programming - Design concepts & design patterns
c programming  Q.1- Write a program in 'c' language to merge the contents of two binary search trees into one. Also, calculate the time and space complexities of your program? Q.2- Write a C++ program to create functions 

Java Beginners

Where to learn java programming language
and want to learn Java and become master of the Java programming language? Where to learn java programming language? Thanks   Hi, Java is Object oriented programming language. It's easy to start learning Java. You can learn how 

Development process Questions

c programming - Development process
c programming  Hello Sir, can you plz post an answer to these quesions : Write a program in c that prompts the user the name of a file... in c to create a fle, open it, type in some characters and count the number 

General

Ask Programming Questions Online
Ask Programming Questions Online   ..., Html questions, PHP questions, Ajax questions, EJB questions, MySQL questions, C..., the integrated programming problems are also increasing. There are countless numbers 

Java Interview Questions

heap and stack in general programming language
heap and stack in general programming language  what's the difference between heap and stack ?   Hi Friend, Differences: 1)Stack is referred as temporary memory while Heap is referred as permanent memory. 2)In stack 

Programming Tutorials

Java Programming: Chapter 2 Quiz
is meant by the syntax and the semantics of a programming language. Give... Quiz Questions For Chapter 2 THIS PAGE CONTAINS A SAMPLE quiz... to answer these questions after studying that chapter. Sample answers to all 

General

About Java Programming Language
About Java Programming Language       Java is an Object oriented application programming language... language. Java programming language is useful for development of enterprise grade 

C++

Java vs C
Java vs. C Language In this section we will compare Java and C Programming... programming language while c is procedural language Platform independence... business problem. Java is object oriented, platform independent programming language 

iPhone

Objective C Introduction
programming language. Objective C is very old programming language... of the class. In a nutshell Objective C is: Extension of C programming language... In the next section we will learn the importance of Objective C programming language 

Java Beginners

How to write in Binary file in Java programming language
How to write in Binary file in Java programming language  I need some help about Java programming. Please explain me "How to write in Binary file in Java programming language 

Programming Tutorials

C++Tutorials
++ is a programming language substantially different from C. Many see C++ as "a better C than... teaches the C++ programming language but assumes that the student has already... easier. However, this is not a course for learning the C++ programming language 

Programming Tutorials

Java Programming: Section 4.3
the same name, provided that their signatures are different. (The language C... of questions about scope of variables and what happens when several variables or parameters have the same name.) Beginning programming students often find 

Java Interview Questions

Difference between C++ and Java - Java Interview Questions
++ and Java   Although both are object oriented programming language and Java...++, but in C++ programming can be done without making objects.Java is a high level... no matter C++ too uses the same.Java is a high-level powerful programming 

General

Java as a general purpose language
;    Java is an Object oriented application programming language... language. It is a stupendous programming language which is not confined... of applications can be written in Java programming language such as any small or large 

Java Beginners

how java programming differ from pascal and C - Java Beginners
how java programming differ from pascal and C  how Does the Java programming language differs from Procedural languages such as Pascal and C.when ýt... and Pascal are both arguably descendants of the ALGOL programming language series. ALGOL 

Java Beginners

hi need help with C++ programming!
hi need help with C++ programming!  how do i : b. Store numbers / characters into the file (output) c. Retrieve numbers / characters from the file...; "Unable to open file"; return 0; } c) #include <iostream> #include < 

Tutorials

What is Objective c iPhone?
What is Objective c? Objective c is a standard objected oriented programming language or we can also say that it is an enhanced version of traditional c... is one of them. This language is based on ANSI C language. While going through 

Java Tips and Examples

Java as a general purpose language
;    Java is an Object oriented application programming language... programming language. It is a stupendous programming language which is not confined... of applications can be written in Java programming language such as any small 

Java Tips and Examples

Java: Language Complexity
Java: Language Complexity Many programming language features are designed... point of view, additional programming language features, eg Java templates, makes... and Apple's Object Pascal) that turned it into a good professional programming language 

Java Beginners

C Language - Java Beginners
C Language  1. What are extension files? Give examples. 2. What is operating system? What are the different types available? 3. What... answer for the above questions since it is very much needed urgently 

C++

C Tutorials
defined in C language have a base address attached to it.   ... C Tutorials       C Array copy example The example below contains two 

Java Beginners

questions
data members b) static methods In our java programming language we have... methods. Methods and Variables in Java In our java programming language we have 2... b. write a program to to calculate factorial of a no. c. write a program 

Java-Tutorials

Difference between C++ and Java
Java and C++ are Object Oriented Programming (OOPs) language. Java... programming and extends the C programming language. Java supports network computing... the class In C++ programming can be done without making objects 

JavaScript Questions

Programming
Programming  Given a number n, write a programming to determine its square root if it is possible, in the contraly case print an appropriate massege on the screen 

Java Beginners

Programming (general)
Programming (general)  I haven't yet started college/university but I'm interested in studying programming. I wondering if programming is difficult... you learn? I'm 16 and wanted to start a language or two before I start 

Ajax Questions

Ajax programming
Ajax programming  Hi, How I can start ajax programming easily? I... concept. What should be my starting point for Ajax programming? Thanks   Hi, If you have prior programming experience in any web development 

Design concepts & design patterns Questions

programming of foxpro
programming of foxpro  hello sir , sir i am use the foxpro . but i know about c . sir how can i learn fox pro . i know about something about foxpro 

Java Interview Questions

programming - Java Interview Questions
 

Java Interview Questions

PROGRAMMING - Java Interview Questions
 

IDE Questions

programming - IDE Questions
 

IDE Questions

programming - IDE Questions
 

Java Beginners

programming
Java Constructor programming for single and double constructor  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object 

iPhone

Objective C
; Objective C is a programming language, which is sleeted by Apple for developing... Objective C tutorials. We will be explaining the programming language with easy... you the basic introduction about Objective C programming language. Objective 

Free Books

C and C++ books-page12
to give you a general overview of the C programming language. Although much.... C has been used successfully for every type of programming problem... program Note C is a relatively small language, but one which wears well. C's 

Java Beginners

c programming..what wil be the output of this program
c programming..what wil be the output of this program   #include int main() { int arr[] = {0,1,2,3,4}; int i,*ptr; for (ptr=arr+4; ptr= arr; ptr--) { printf("%d",*ptr 

General

Basic Java Language Elements
in the program.   Java Comments To comprehend any programming language... programming language is a language in which all the variables must be declared... you will be introduced to the concept of Arrays in Java Programming language 

Programming Tutorials

Computer Architecture and Programming Languages
a "programming language" that humans can read and write, and that can... for mainstream programming. High-level language - Mainstream programming. Human "readable" language 

Mobile Applications Questions

Language in iphone development??
Language in iphone development??  What programming language we use in iphone development???   hello, we are using Objective C in iphone development 

Java Beginners

PROGRAMMING
 

WebSevices Questions

programming
 

Java Interview Questions

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Java Beginners

programming
 

Ajax-Tutorial

ajax programming
Ajax Programming What is Ajax Programming? Asynchronous JavaScript and XML... of the application. The major advantage of this language is that it can modify... is based on the HTML, Java Script, CSS, and XML. Why Ajax Programming? When you 

JSP Servlet Questions

How to make session control using only JSP programming language
How to make session control using only JSP programming language  Could i do Controlling session using only JSP programming language without using anylanguage 

Java Interview Questions

Java Programming
¢â??¢s programming mark. Determine how many student get A+ and A for their grade... -100 A+ 80 - 84 A 75 - 79 B+ 70 - 74 B 65 - 69 B- 60 - 64 C+ 55 Ã?¢ââ??‰â?¬Å? 59 C 50 - 54 C- 45 - 49 D+ 40 - 44 D 0 E   import java.util. 

Java Beginners

IT115 programming with java - Java Beginners
IT115 programming with java  3. Answer those questions that you can answer quickly first, then proceed with the other questions. 4. Ensure that you answer all parts of a question. Some questions have more than one part 

Programming Tutorials

Java Programming: Section 1.3
languages such as Java, Pascal, or C++. A program written in a high-level language...-level language programs. For example, the programming language Lisp is usually... Section 1.3 The Java Virtual Machine MACHINE LANGUAGE CONSISTS 

JavaScript Questions

java programming
programming mark. Determine how many student get A+ and A for their grade and how many... A 75 - 79 B+ 70 - 74 B 65 - 69 B- 60 - 64 C+ 55 â?? 59 C 50 - 54 C- 45 - 49 D...){ data[i].setGrade("C-"); } if(marks> 

General

Ask Perl Questions Online
, interpreted, dynamic programming language usually used for server side scripting... development. Ask any questions whether programming, scripting... is a practical language that includes the overall structure of C language and some 

iPhone

Why Objective C?
and "Why Objective C?" is used as programming language to develop applications... organized language ?Objective-C language is selected for the Cocoa framework... benefit of C language.    With this language user can select both object 

Java Beginners

java programming
outp = 0; for(int i = 0; i < FCM.points; i++) { for(int c = 0; c <Clusters; c++) { outp += FCM.Group_Cluster[c][i 

Programming Tutorials

Java Programming: Section 12.1
++. Generic Programming in Java Like C++, Java is a strongly typed language..., and the program will crash. Generic Programming in C++ Unlike Smalltalk, C++ is a very strongly typed language, even more so than Java. Every 

Mobile Applications Questions

object oriented programming protocol
object oriented programming protocol  What is object oriented programming protocol? Is it different from objective c protocol programming?? Thanks 

Java Tips and Examples

Java Programming Idioms
Java: Java Programming Idioms Introduction Every programming language has its ways of writing common programming constructions. Sometimes these are used to solve particular problems in a programming language, and other times 

Programming Tutorials

Java Programming: Section 11.5
the semantics of a language -- even of an artificial programming langauge -- is one... the syntax of a programming language such as Java in a formal and precise way... been fascinated by language -- both natural languages like English 

Free Programming books

C# Programming Books
introduction of the .NET platform, a new, exciting programming language was born. C...# is pronounced as "C sharp". It is a new programming language that enables... just another programming language. It is our intention to help you apply C 

Java Beginners

Java Programming
the balance. c. Compute and deposit interest d. Permit the withdrawal and update 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

JSP Servlet Questions

error at programming
{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c 

Programming Tutorials

Java Programming: Section 9.1
of the methods in these classes are actually written in the C programming language rather... another lost spacecraft. In the FORTRAN programming language, the command "DO... is to design a programming language in which the errors are impossible 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.