NEWS: Total Picture Views: 155282 | Total Article Views: 165600 | Top 5 Most Popular Article: 1. Am I Stuck Algorithm with Becker Robot | 2. PickUpThings with Becker Robot | 3. How to read a JSON and work with it | 4. Encrypted Data GUI (Download .Zip) | 5. Create Wall and Things with Becker

Small Program Example Using Loop And Variable C


In this example I will be showing you a small program example using for loop and variable and print the result.


#include <stdio.h>
#include <string.h>
#include <math.h>

//Main Method
int main(int argc, char *argv[]){
	int i=0;
	char name[100] = "PROG20799";
	double result=0.0;
	//For Loop
		result += sqrt(i);
	//Print Statement
	printf("the code is: %s
", name);
	printf("the result is: %f
", result);
	//Must return a interger
	return 0;
Attachments: None

Tags: For loop Printf Include C

Total Views: 847

My name is Jean-Mathieu

I created this website so other people could enjoy finding useful stuff easier. If you have any question do not hesitate to contact me.

jean8mathieuCreated on 01/13/15 and updated on 01/16/15


Disclosure: We are a website that needs compensation to operate like any other website on the internet.
We may receive consideration for our reviews but we are totally unbiased and do not accept paid reviews or fake reviews claiming to be something they are not.