#include <stdlib.h>
#include <stdio.h>
#include <math.h>
void forloop( int firstNum, int ratio, int repeats) ;
int main( void )
{
int firstNum = 0 ;
int ratio = 0 ;
int repeats = 0 ;
printf ( "First number of the series: " ) ; printf ( "the ratio of the series: " ) ; printf ( "the amount of numbers to display is " ) ; forloop( firstNum, ratio, repeats) ;
}
void forloop( int firstNum, int ratio, int repeats)
{
int i = 0 ;
for ( i= 1 ; i!= repeats+ 1 ; i++ )
{
}
}
I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPG1hdGguaD4KCnZvaWQgZm9ybG9vcChpbnQgZmlyc3ROdW0saW50IHJhdGlvLGludCByZXBlYXRzKTsKaW50IG1haW4odm9pZCkKeyAKICAgIGludCBmaXJzdE51bSA9IDA7CiAgICBpbnQgcmF0aW8gPSAwOwogICAgaW50IHJlcGVhdHMgPSAwOwogICAgcHJpbnRmKCJGaXJzdCBudW1iZXIgb2YgdGhlIHNlcmllczogIik7CiAgICBzY2FuZigiJWQiLCAmZmlyc3ROdW0pOwogICAgcHJpbnRmKCJ0aGUgcmF0aW8gb2YgdGhlIHNlcmllczogIik7CiAgICBzY2FuZigiJWQiLCAmcmF0aW8pOwogICAgcHJpbnRmKCJ0aGUgYW1vdW50IG9mIG51bWJlcnMgdG8gZGlzcGxheSBpcyAiKTsKICAgIHNjYW5mKCIlZCIsICZyZXBlYXRzKTsKICAgIGZvcmxvb3AoZmlyc3ROdW0scmF0aW8scmVwZWF0cyk7Cn0KCnZvaWQgZm9ybG9vcChpbnQgZmlyc3ROdW0saW50IHJhdGlvLGludCByZXBlYXRzKQp7CiAgICBpbnQgaSA9IDA7CiAgICBmb3IgKGk9MTsgaSE9cmVwZWF0cysxO2krKykKICAgIHsKICAgICAgICBwcmludGYoIiVkICIsIGZpcnN0TnVtKihwb3coIHJhdGlvLCBpKSkpOwogICAgfQp9Cg==
compilation info
prog.c: In function ‘forloop’:
prog.c:25:18: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Werror=format=]
printf("%d ", firstNum*(pow( ratio, i)));
^
cc1: all warnings being treated as errors
stdout