C++ programming language

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\n", sum);
i = i +i/3+i/5;
}
}

I couldnt get the output.
my output should be, if i enter 3:
1.000000, 1.33333 should come out
View Answers









Related Tutorials/Questions & Answers:
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
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
Advertisements
C Language
C Language  What's the right declaration for main()? Is void main() correct? in C language ? please help me sir ! Thank You
C language
C language  i want that when i hit any key only * to be print not the hit key in c language   The given example will display aestricks on hitting any key. #include "stdio.h" #include "conio.h" #include "ctype.h" int
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
C Language
C Language  Respected sir, Why does sizeof report a larger size than I expect for a structure type, as if there were padding at the end? help me sir
C Language
C Language  Respected Sir, How can I determine the byte offset of a field within a structure? How can I access structure fields by name at run time? please help me sir . Thank you sir
programming c#
programming c#   create and make use of at least one class with appropriate instance methods to solve the programming problem. use console-based menus to navigate between the functionality offered by the application. at least one
c programming
c programming  how can i get the ouput in the format of a a b a b c
c programming
c programming  write a program to input five numbers by using while loop in c programing
c programming
c programming  how can i get the ouput in the format of a a b a b c
c programming
c programming  how can i get the ouput in the format of a a b a b c
C programming
C programming  i am beginner in C my text book says getchar() and putchar() reads single character at a time and print single character respectively...) { int c; while((c=getchar())!=EOF) { putchar(c); return 0; } i
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
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
c language code
c language code  Dear Sir, Could you send me the c language codings for BOOK BANK
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
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
What is R programming language?
What is R programming language?  Hi, What is R programming language? How R programming language is used in real programming? People around the world is taking about R programming language. Why this programming language is very
c-language pointer functions
c-language pointer functions  what is the execution process of character pointer functions with example
Java Programming Language
Java Programming Language  Hi, For beginner which programming concepts is important? Discuss the importance of Java programming language. (adsbygoogle = window.adsbygoogle || []).push({}); In the discussion
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
Go Programming Language
source programming language Syntax is loosely derived from C and garbage...Go Programming Language tutorials and examples The Go programming language, also known as Golang is basically a programming language which was initially
hotel management programme in c language?
hotel management programme in c language?  hotel management programme in c language
about a program in c language
about a program in c language   Write a program that inputs five different integers from the keyboard, then print the sum, the product, the smallest and the largest of these numbers. Use only single selection form of if statement
Objective C Introduction
programming language. Objective C is very old programming language..._TO_REPLACE_1 Objective C is simple and very intuitive programming language that makes... selected Objective C as primary programming language for Mac machine and iPhone. So
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 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
How to learn R as a programming language?
How to learn R as a programming language?  Hi, I want to learn R for Big Data analysis in my company. How to learn R as a programming language? Thanks   Hi, For Learning R Programming you have to download
How to learn R as a programming language?
How to learn R as a programming language?  Hi, I want to learn R for Big Data analysis in my company. How to learn R as a programming language? Thanks   Hi, For Learning R Programming you have to download
How to learn R as a programming language?
How to learn R as a programming language?  Hi, I want to learn R for Big Data analysis in my company. How to learn R as a programming language? Thanks   Hi, For Learning R Programming you have to download
logic for c language
logic for c language  01 02 03 04 05 06 20 21 22 23 24 07 19 32 33 34 25 08 18 31 36 35 26 09 17 30 29 28 27 10 16 15 14 13 12 11
What is the use of R Programming Language?
What is the use of R Programming Language?  Hi, Everyone is talking at loud about the R Programming language. If you see any job portal you... Programming Language? Thanks   Hi, R is a programming language
Change case in C language
Change case in C language  I want to right in .dat file through structure.For this i have defined following: struct student //structure defination... If user is typing b5678 ,i want to store as B5678. (C)for input i am using
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 is the purpose of operating system? 4. What is the function of operating system? 5
Learning Java Programming for Beginners
Java is an Object Oriented Programming Language that was developed by Sun Microsystems. It is based on C, C++ programming language but a tad better... are eyeing the vast field of programming and software development
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
Is the R programming language worth knowing?
Is the R programming language worth knowing?  Hi, What is the use of R programming on Big Data? Is the R programming language worth knowing? Thanks... Programming language comes with 4000+ packages which can be used for various purposes
What type of programming language is Java?
What type of programming language is Java?  Hi, What type of programming language is Java? Why anyone should learn Java? What is Java and what..., general purpose, high level programming language which supports development
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
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
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
Which is the first AI programming language?
Which is the first AI programming language?  Hi, I am beginner... to learn: Which is the first AI programming language? Try to provide me good... programming language?". Also tell me which is the good training courses
How to learn Python programming language?
language. There are many programming languages such as C/C++ Programming Language...Learn fast growing Python Programming Language - How to learn Python programming language? Due to the simplicity, ease of programming and vast opportunities
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
ModuleNotFoundError: No module named 'HTML-as-programming-language'
ModuleNotFoundError: No module named 'HTML-as-programming-language'  ...: No module named 'HTML-as-programming-language' How to remove the ModuleNotFoundError: No module named 'HTML-as-programming-language' error
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
write a program to use for loop print **********========== in c language
write a program to use for loop print **********========== in c language  write a program to use for loop print **========== in c language
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...-declared outside the class In C++ programming can be done without
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

Ads