Write a C program to find the sum of positive integers without using any operators, and only using the printf() function?

0

Here is an example of a C program that finds the sum of positive integers without using any operators:

This program prompts the user to enter a positive integer, then uses a for loop to iterate from 1 to that number, printing each number and adding it to the variable sum. Finally, it prints the sum of the numbers.

Note: The above program uses scanf() function, which is a library function to read inputs from the user.

Post a Comment

0Comments
Post a Comment (0)